Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $vhost_config = '
- server {
- listen 80;
- server_name ' . $servername . ' ' . $alias . ';
- root ' . $vhostsroot . '/' . $username . '/data/www/' . $servername . ';
- access_log ' . $vhostsroot . '/' . $username . '/data/logs/' . $servername . '.access.log;
- error_log ' . $vhostsroot . '/' . $username . '/data/logs/' . $servername . '.error.log;
- index index.php index.html index.htm;
- error_page 500 502 503 504 /50x.html;
- server_name_in_redirect off;
- client_max_body_size 12M;
- location = /50x.html
- {
- root /var/www/nginx-default;
- }
- location /
- {
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://127.0.0.1:8080;
- #proxy_redirect http://' . $servername . ':8080/ /;
- }
- location ~* ^.+\.(jpg|jpeg|gif|png|rar|txt|tar|wav|bz2|exe|pdf|doc|xls|ppt|bmp|rtf|js|ico|css|zip|tgz|gz)$
- {
- root ' . $vhostsroot . '/' . $username . '/data/www/' . $servername . ';
- expires 30d;
- access_log off;
- }
- location ~ /\.ht
- {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement