daily pastebin goal
9%
SHARE
TWEET

Test

a guest Apr 6th, 2012 15 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     my $vhost_config = '
  2.     server {
  3.         listen 80;
  4.         server_name ' . $servername . ' ' . $alias . ';
  5.         root        ' . $vhostsroot . '/' . $username . '/data/www/' . $servername . ';
  6.         access_log  ' . $vhostsroot . '/' . $username . '/data/logs/' . $servername . '.access.log;
  7.         error_log   ' . $vhostsroot . '/' . $username . '/data/logs/' . $servername . '.error.log;
  8.         index       index.php index.html index.htm;
  9.         error_page  500 502 503 504 /50x.html;
  10.         server_name_in_redirect off;
  11.         client_max_body_size 12M;
  12.        
  13.         location = /50x.html
  14.         {
  15.             root /var/www/nginx-default;
  16.         }
  17.        
  18.         location /
  19.         {
  20.             proxy_set_header X-Real-IP $remote_addr;
  21.             proxy_set_header Host $host;
  22.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23.             proxy_pass http://127.0.0.1:8080;
  24.             #proxy_redirect http://' . $servername . ':8080/ /;
  25.         }
  26.        
  27.         location ~* ^.+\.(jpg|jpeg|gif|png|rar|txt|tar|wav|bz2|exe|pdf|doc|xls|ppt|bmp|rtf|js|ico|css|zip|tgz|gz)$
  28.         {
  29.             root ' . $vhostsroot . '/' . $username . '/data/www/' . $servername . ';
  30.             expires 30d;
  31.             access_log off;
  32.         }
  33.        
  34.         location ~ /\.ht
  35.         {
  36.             deny all;
  37.         }
  38.     }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top