full main.conf

Pascale Camille lists at ruby-forum.com
Thu Aug 14 07:34:44 UTC 2014


server {
listen 80;
 charset    utf-8;
 source_charset  utf-8;
server_name www.2maxi.com;
root /var/www/www;
index 2maxi.com.html index.php;

error_page 405 /405.html;
       location = /405.html {
       rewrite . http://www.2maxi.com/2maxi.com.gif redirect;
       allow all;
       }
error_page 400 401 402 403 404 406 407 408 409 410 411 412 413 414 415 
416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
      location  /error_page.html {
           rewrite . http://www.2maxi.com/ redirect;
           allow all;
       }
  include /etc/nginx/conf.d/cache.conf;
  include /etc/nginx/conf.d/deny.conf;
  include /etc/nginx/conf.d/php.conf;
#  include /etc/nginx/conf.d/limit.conf;
}
server {
    listen       80;
    server_name 2maxi.com 198.23.165.81 .2maxi\.com$\(?<user>.+) 
www.2maxi\.com$\(?<user>.+);
    return       301 http://www.2maxi.com$request_uri;
}
server {
listen 80;
 charset    utf-8;
 source_charset  utf-8;

server_name ~^(?<user>.+)\.2maxi\.com$;
root /var/www/$user;
    return       301 http://~^(?<user>.+)\.2maxi\.com$request_uri;

index 2maxi.com.html index.php;

error_page 405 /405.html;
       location = /405.html {
       rewrite . http://www.2maxi.com/2maxi.com.gif redirect;
       allow all;
       }
error_page 400 401 402 403 404 406 407 408 409 410 411 412 413 414 415 
416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
      location  /error_page.html {
           rewrite . http://www.2maxi.com/ redirect;
           allow all;
       }

  include /etc/nginx/conf.d/cache.conf;
  include /etc/nginx/conf.d/deny.conf;
  include /etc/nginx/conf.d/php.conf;
#  include /etc/nginx/conf.d/limit.conf;
}

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list