SHARE
TWEET

nginx conf

a guest Sep 11th, 2011 178 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen 80;
  3.     server_name ~^(?!www\.);
  4.     rewrite ^ http://www.$host$request_uri permanent;
  5.  
  6. }
  7.  
  8. server {
  9.    listen       80;
  10.    server_name   ~^(www\.)?(?P<domain>.+)$;
  11.     location / {
  12.         root   /var/www/html/$domain;
  13.         index  index.html index.htm;
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top