2017-06-26 13:37:41 +00:00
|
|
|
user www www; ## Default: nobody
|
|
|
|
error_log logs/error.log;
|
|
|
|
|
|
|
|
events { # events test
|
|
|
|
worker_connections 4096;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
include conf/mime.types; # relative path
|
|
|
|
include /etc/nginx/proxy.conf; # absolute path
|
2017-09-15 20:37:57 +00:00
|
|
|
include /etc/nginx/conf.d/*.conf; # wildcard path
|
2018-05-03 13:53:20 +00:00
|
|
|
include "/etc/nginx/quotes.d/*.conf"; # path with quotes
|
2017-06-26 13:37:41 +00:00
|
|
|
|
|
|
|
index index.html index.htm index.php;
|
|
|
|
default_type application/octet-stream; # parameter with '/'
|
|
|
|
|
|
|
|
# multi-line test
|
|
|
|
log_format main
|
|
|
|
multi line;
|
|
|
|
|
|
|
|
# multi server tests
|
|
|
|
server {
|
2017-09-15 20:37:57 +00:00
|
|
|
listen 80;
|
2017-06-26 13:37:41 +00:00
|
|
|
server_name domain1.com www.domain1.com;
|
|
|
|
location ~ \.php$ {
|
|
|
|
fastcgi_pass 127.0.0.1:1025;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2017-09-15 20:37:57 +00:00
|
|
|
listen 443;
|
2017-06-26 13:37:41 +00:00
|
|
|
server_name domain2.com www.domain2.com;
|
|
|
|
# multiple locations test
|
|
|
|
location ~ ^/(images|javascript|js|css|flash|media|static)/ {
|
|
|
|
root /var/www/virtual/big.server.com/htdocs;
|
|
|
|
}
|
|
|
|
location / {
|
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# upstream tests
|
|
|
|
upstream big_server_com {
|
|
|
|
server 127.0.0.3:8000 weight=5;
|
|
|
|
server 192.168.0.1:8000;
|
|
|
|
}
|
|
|
|
}
|