• Resolved cjsdfw

    (@cjsdfw)


    Hi,
    I am trying to install WP Multisite on a local server as a development platform.
    I am not sure I can run Subdomain WP Multisite in an Apache Virtualhost or not and would like clarification that it is possible or not.

    My current environment is Windows 10 host running Virtualbox and Centos 7.6 LAMP stack as guest OS.

    If I try to install WP Multisite under a virtualhost I run into a “The page isn’t redirecting properly” issue.

    If I install directly onto the default werver directory configured in “/etc/httpd/conf/httpd.conf” : <Directory “/var/www/html”> it runs fine. I can access the main site as well as subdomain sites and domain mapped sites.

    Here is the virtualhost definition:

    
    <VirtualHost *:80>
       ServerName pr-homes.com
       Redirect "/" "https://pr-homes.com/"
    </VirtualHost>
    
    <VirtualHost *:443>
        ServerName pr-homes.com
        ServerAlias www.pr-homes.com
        ServerAdmin [email protected]
        DocumentRoot /var/www/html/pr-homes.com/public_html
        ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    
        <Directory /var/www/html/pr-homes.com/public_html>
                Options +Indexes +FollowSymLinks +ExecCGI
                AddHandler php-fastcgi .php
                Action php-fastcgi /cgi-bin/php.fastcgi
            <FilesMatch "\.php$">
                SetHandler php-fastcgi
            </FilesMatch>
                AllowOverride All
                Order allow,deny
                Allow from All
        </Directory>
    
        ErrorLog /var/log/httpd/pr-homes.com-error.log
        CustomLog /var/log/httpd/pr-homes.com-access.log combined
    </VirtualHost>
    

    Any help will be greatly appreciated. I am no expert and it took me 3 weeks to realize that if I ran under “/var/www/html” it would work. I rahter install it under a virtualhost if possible.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Stay tuned just in case someone here has some insights but…

    This is pretty far afield from WordPress itself. You might find some good help with that at Stack Exchange though.

    Thread Starter cjsdfw

    (@cjsdfw)

    Ok, just in case some else runs into this issue this is how I resolved it:

    1) There are no restrictions on running WP Multisite in an Apache Virtual Host
    2) In fact you can configure multiple WP Multisites each on its own Virutal Host without issues.

    I was able to identify two problems: these were my issues, yours may be different but keep an eye for this ones:

    1) I wanted to support SSL so I found out you MUST define an SSL certificate for each of the WP Multisite installs specific to the WPMU domain.
    2) If you have domain mapped WPMU site you also need to configure SSL certificates for those sites.
    3) Since I am running a “Private Network” it was crucial to disable OCSP Stapling for this setup to work

    The following site was of great help in uncovering the above issues:
    https://ssl-config.mozilla.org/#server=apache&server-version=2.4.29&config=intermediate&openssl-version=1.1.1

    I hope this may help others.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Subdomains Multisite Virtuahost configuration’ is closed to new replies.