Skip to content

Commit

Permalink
Merge pull request #21 from bryanlatten/feature-nginx-server-block
Browse files Browse the repository at this point in the history
Nginx: move default server block out of conf
  • Loading branch information
Bryan Latten committed Feb 8, 2016
2 parents 7813999 + 8c840db commit ae0a6f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 81 deletions.
82 changes: 2 additions & 80 deletions container/root/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,84 +42,6 @@ http {
scgi_temp_path /tmp/scgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;

server {
listen 80;
server_name localhost;

#charset koi8-r;

location / {
root html;
index index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

# Everything available is enabled in the container
include /etc/nginx/sites-available/*;
}
3 changes: 2 additions & 1 deletion container/root/etc/nginx/sites-available/default
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
server {
listen 80;

server_tokens off; # Doesn't broadcast version level of server software
# Doesn't broadcast version level of server software
server_tokens off;

# Replace with env variable SERVER_INDEX
index index.html index.htm;
Expand Down

0 comments on commit ae0a6f9

Please sign in to comment.