Ubuntu VPS: Wordpress Multisite Virtualhost

oguruma

New Member
I need some help configuring my my virtualhost file for Wordpress Multisite. I want to use subdomains instead of directories.

I have enabled Multisite on boosterclubnetwork.com and the primary site boosterclubnetwork.com works fine.

I added a site madison.boosterclubnetwork.com however that site does not load, rather it cannot find the /wp-admin page.

I am assuming that this is because I do not have wildcards set up for the virtualhost file.

Does anybody have an example of what the virtualhost file would look like?
 


LXS

New Member
server {
listen 192.168.1.1:80;
server_name subdomain.domain.com www.subdomain.domain.com;

access_log /usr/local/apache/domlogs/subdomain.domain.com.bytes bytes;
access_log /usr/local/apache/domlogs/subdomain.domain.com.log combined;
error_log /usr/local/apache/domlogs/subdomain.domain.com.error.log error;

location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh)$ {
root /home/domain/subdomain;
expires max;
try_files $uri @backend;
}

error_page 405 = @backend;
error_page 500 = @custom;
add_header X-Cache "HIT from Backend";
proxy_pass http://192.168.1.1:8181;
include proxy.inc;
}

location @backend {
internal;
proxy_pass http://192.168.1.1:8181;
include proxy.inc;
}

location @custom {
internal;
proxy_pass http://192.168.1.1:8181;
include proxy.inc;
}

location ~ .*\.(php|jsp|cgi|pl|py)?$ {
proxy_pass http://192.168.1.1:8181;
include proxy.inc;
}

location ~ /\.ht {deny all;}
location ~ /\.svn/ {deny all;}
location ~ /\.git/ {deny all;}
location ~ /\.hg/ {deny all;}
location ~ /\.bzr/ {deny all;}

disable_symlinks if_not_owner from=/home/domain/subdomain;

location /.well-known/acme-challenge {
default_type "text/plain";
alias /usr/local/apache/autossl_tmp/.well-known/acme-challenge;
}
}
 

Members online


Top