Wordpress installation on Nethserver (multiple vhosts)

Hi Marko,

Sometime, it is required to quote SQL parameters with apostrophe-e, i.e. (’) if you are using non-alphabetic characters.

Michel-André

The database don’t like my underscores ‘_’
If I substitute the names only by alphanumeric characters, it works.

That:s totally crazy. I used my naming convention since 12 years w/o problems.

Is there any doubt that creating databases in connection with Wordpress installations (or other scripts) via GUI should be supported?
Well, my need for try and error is more than satisfied.

Sorry, I saw this posting too late. But I would not try it again.

Hi Marko,

As you see with the answer of the above command, it is alway better to use ( ’ ) with the parameters.

Michel-André

1 Like

@michelandre

I admire your patience. For you these are probably all banalities.

1 Like

Hi Marko,

It is not banalities for me, it is always hard to work with DB.
I am patient because I like to share my little knowledge to help people as I would have like been helped when I was a newbee.

Here, it is you that is the patient person to try and try again until it is working. This is the root of a real pro.

Michel-André

3 Likes

Thank you.
I have perfect conditions…
I am lying at home sick with severe pain and urgently need distraction.

The next step: To configure my mail server.
But I will start a new thread.

one question to @stephdl

Should I adapt your recommendations from the manual starting in chapter III/6 by replacing “/var/www/html” with my path to the vhost?
Best regards, MArko

for me this folder is only for tests, use a vhost for work

1 Like

follow up here

Hi @stephdl ,
After the page is basically running, I analyze the concrete behavior. I notice that the .htaccess file is obviously not processed.
You are advised to adjust the file /etc/httpd/conf/httpd.conf in your manual.

##### AllowOverride None
# Modification par Michel-André le 8 février 2019
# afin que le démon httpd traite les fichers .htacces dans # les répertoires et sous-répertoires de /var/www/html. AllowOverride All

But these changes would only affect the var/www/html directory. What do I have to enter if I want this to affect my various vhost directories?
It would be logical to add the directory to the vhost. /var/lib/nethserver/vhost/abcdefeghijk123/

    ##### AllowOverride None
    # Modification par Michel-André le 8 février 2019
    # afin que le démon httpd traite les fichers .htacces dans # les répertoires et sous-répertoires de
/var/lib/nethserver/vhost/abcdefeghijk123/. AllowOverride All

Can or must I make these entries several times, since I have several vhosts?
What about the unique definition DocumentRoot "/var/www/html"?

Could there be other reasons why the .htaccess file is not evaluated?

Best regards, Marko

.htaccess has been designed to match the vhost, originally when you do not have access to the global configuration of apache you write a .htaccess to modify your vhost. So yes for me, three vhost, three .htaccess

Of course, I have .htacces-Files within each vhost directory. But it seems that Apache doesn’t process them.
so I thought it would help to adjust the /etc/httpd/conf/httpd.conf file

The question is,

What do I have to enter if I want this to affect my various vhost directories?
It would be logical to add the directory to the vhost. /var/lib/nethserver/vhost/abcdefeghijk123/

Can or must I make these entries several times, since I have several vhosts?

That means, can I add such statements more than once for each host?
Or how else Apache knows that it should also evaluate the .htaccess files in the different vhost directories ?

Read /etc/httpd/conf.d/virtualhosts.conf you will read allowoverride all for each vhost, apache will read and use .htaccess for each vhost

After all maybe your htaccess is wrong and you need to adjust it

.htaccess seems to be functional now. I don’t know why because I didn’t change anything.

Hi Marko,

After modifying the config of Apache for the AllowOverride All, you have to restart the httpd daemon. Maybe a reboot did the job.

The restarting of the httpd daemon is not necessary for the vhost as its config file already contains AllowOverride All when it is created.

Michel-André

1 Like

Thank you.
one problem I still have apparently.
I prefer using URLs with out the leading “www”. Therefore my site works fine with out.

But to be accessible for others with www as well, I created an A-Record with www.myancestry.de.

Unfortunately the wrong Let’s encrypt certificate is provided by dargels.de.
What could be the cause?

Does the server actually create wildcard certificates or is only the root domain secured?

best regards, Marko

Hi Marko,

I do not remember when and why, but I always add 2 alias under Configuration → DNS → Alias: mail.FQDN and www.FQDN.

Michel-André

Memory is a faculty that forgets…

No, it’s not a wildcard cert.

You may configure more domains for letsencrypt like

ahahhhh!
I see. I thought here are only root domains possible.
Thank you