OXY Classifieds - Wiild Card domain
OXY Classifieds - Wiild Card domain
Need some advice . Using OxyClassifieds
VestaCP /w Nginx - default + phpfcgdi
1) Htaccess - made the following adjustment
http://www.oxyclassifieds.com/documenta ... g-location
2) VestaCP Admin
Web Aliases added
*.mydomain.com
DNS added record
* A my ip address
3)Domain httpd.conf - changed
ServerAlias *.mydomain.com
Restarted Apache / Nginx
Still got browser message "Page not Found " after clicking Region sub domain
However only after adding the following to domain nginx.config :
ref:http://serverfault.com/questions/249952 ... -on-nginx/
Was I able to access site region subdomain
Q. Is my nginx.conf below correct ?
VestaCP /w Nginx - default + phpfcgdi
1) Htaccess - made the following adjustment
http://www.oxyclassifieds.com/documenta ... g-location
2) VestaCP Admin
Web Aliases added
*.mydomain.com
DNS added record
* A my ip address
3)Domain httpd.conf - changed
ServerAlias *.mydomain.com
Restarted Apache / Nginx
Still got browser message "Page not Found " after clicking Region sub domain
However only after adding the following to domain nginx.config :
Code: Select all
server_name ~^(?<vhost>.*)$;
root /srv/www/$vhost;
access_log /var/log/nginx/$vhost.access.log;
Was I able to access site region subdomain
Q. Is my nginx.conf below correct ?
Code: Select all
server {
listen mydomain ip ;
server_name ~^(?<vhost>.*)$;
root /srv/www/$vhost;
access_log /var/log/nginx/$vhost.access.log;
error_log /var/log/httpd/domains/mydomiain.com.error.log error;
location / {
proxy_pass http://mydomian ip :8080;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|exe|pdf|doc|xls|ppt|txt|odt|ods|odp|odf|tar|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
root /home/web/mydomain.com/public_html;
access_log /var/log/httpd/domains/mydomain.log combined;
access_log /var/log/httpd/domains/mydomain.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias /home/web/mydomian .com/document_errors/;
}
location @fallback {
proxy_pass http://mydomian ip :8080;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/conf/web/nginx.mydomian.com.conf*;