Virtualhost mapped to WordPress multisite sub-domains

NethServer Version: NethServer release 7.3.1611 (Final)
Module: virtualhosts

Good evening everyone,
I have a problem to map virtualhost to a wordpres multisite sub-domain. I tried to instal follow howto guide from the forum with no good result. so I decided to try to manually install wordpress.

I create virtualhost and I enable FTP load the wordpress files. Start the installation and I have a problem with the permissions on the folder virtualhost.

Which is the best way to solve writing problems?
I can set as owner apache without creating problems for ftp client?

I already tried to install by following this guide :

but is useful to me because I need to install it for several virtualhost. For this reason I tried to do a manual installation.

I thought it was possible to enable multisite and map the sub-domains with virtualhost, but failed to complete the installation.

When I try to move the directory from “wordpress” to the example.com domain, wordpress not working.

i think It’s depend there are two of apache configuration files which set different parameters for the same virtualhost.

@stephdl can give me some advice to find a solution to the problem?

wordpress stores the url in its database, you cannot install wordpress with the url example.com domain and use the url example2.com, the css is broken.

I never used wordpress with the multisite, you should look for howtos

I was referring to this:

config setprop wordpress DomainName example.com
signal-event nethserver-wordpress-update 

as a result I have two files (wordpress.conf and default-virtualhost.inc) in the conf.d folder of Apache. Instead I should have the same settings I have in wordpress.conf for each virtualhost.

yes, you can chown the Ibays directory to apache, but it is insecure, you should chown only the config files and the data directory

for my rpm I add some permissions more

no clues for a multisite installation, never tried myself

what are the symptoms when you describe that wordpress was not working…no clues in /var/log/httpd ?

my rpm installs the wordpress.conf, if you change the alias (/domain.com/alias) or the virtualhost (wordpress.domain.com), all changes are in the /etc/httpd/conf.d/wordpress.conf. It is not designed for a multisite installation, even if the code could be changed. Like I pointed before, all changes to the alias or virtualhost must be done before to the mysql database, and after change the wordpress.conf by the config command you gave

I try to better describe what is my scenario:

Suppose that the second-level domain of my NS is example.net
i want to install wordpress for various third-level domains (vhost1.example.net, vhost2.example.net, …, n)

the first thing I created virtual hosts 1, 2, … n
install nethserver-wordpress from rpms and proceed to the configuration from vhost1.example.net/wordpress/

Completed the installation of WP and /etc/httpd/conf.d/ are two files that manage my vhost without conflict:

1- wordpress.conf for vhost1.example.net/wordpress/
2- default-virtualhost.inc for vhost1.example.net/

when I try to change the WP installation from vhost1.example.net/wordpress/
in vhost1.example.net/ (only third-level domain without wordpress subfolder) with the command:

config setprop wordpress DomainName vhost1.example.net
signal-event nethserver-wordpress-update

inserting the two URL into the database when reloading the page is no longer displayed WP.

I think it’s because I have two files in a conf.d (wordpress.conf and default-virtualhost.inc) that set different settings for the vhost1.example.net

I stop here!

Also if active ssl for different vhosts does not load properly the pages and creates conflicts with the login page

[root@nethserver vhost1.example.net]# chown apache:apache -R wp-admin/
[root@nethserver vhost1.example.net]# chown apache:apache -R wp-content/

Using these commands can make it work, but if active .htaccess the site is no longer loaded and I view the default page of apache.

how can I activate .htaccess not create conflict?

you are the root, get rid of .htaccess…be the master of your server :slight_smile:

I hope to have solved

entering this in the .htaccess file is not having problems loading

Options +FollowSymLinks -MultiViews

Thanks for the support!

2 Likes

I would be interested by a full howto on what you did, it could be interested for others…and me :slight_smile:

Please do it while it is hot in your head and of course once workable.

Actually I’m preparing a talk on gpg…my time is short :slight_smile:

I am trying to install wordpress on NS7 final using this guide, but i am getting the error, that: No package nethserver-wordpress available.
Running a yum search lists a lot, but no wordpress:
…
nethserver-virtualhosts.noarch : Virtual hosts configuration
nethserver-vsftpd.noarch : NethServer vsftpd configuration
nethserver-webtop4.noarch : NethServer webtop configuration
nethserver-webtop5.noarch : NethServer webtop5 configuration
nethserver-webvirtmgr.noarch : WebVirtMgr panel for manage virtual machine
nethserver-xinetd.noarch : Conifigure xinetd
nethserver-yum.noarch : NethServer package management

Am i doing something wrong?

It’s in the stephdl repository:

https://wiki.nethserver.org/doku.php?id=wordpress

1 Like