Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- original post from: http://anton-slim.com/?p=219
- server {
- server_name *.debian;
- charset utf-8;
- set $subdomain "";
- if ($host ~* ^([a-z0-9-\.]+)\.debian$) {
- set $subdomain $1;
- }
- if ($host ~* ^www.local$) {
- set $subdomain "";
- rewrite ^ http://debian permanent;
- }
- root /home/slim/subdomains/$subdomain;
- client_max_body_size 32M;
- access_log /home/slim/logs/access.nginx.log main;
- error_log /home/slim/logs/error.nginx.log error;
- location / {
- index index.html index.php;
- try_files $uri $uri/ =404;
- }
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- # With php5-cgi alone:
- #fastcgi_pass 127.0.0.1:9000;
- # With php5-fpm:
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement