Skip to content

Commit

Permalink
Add https congig in nginx vhost skel
Browse files Browse the repository at this point in the history
  • Loading branch information
zunkree committed Oct 18, 2011
1 parent c919705 commit a65fec9
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .vim/skel/conf/vhost_nginx.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
server {
listen 80;
server_name %vim%vhostname% www.%vim%vhostname%;

# if ( $scheme = "http" ) {
# rewrite ^/(.*)$ https://$host/$1 permanent;
# }

error_page 500 502 503 504 /50x.html;
location = /50x.html {
location = /50x.html {
root /usr/local/www/nginx-dist;
}
location / {
index index.php;
root /usr/home/projects/%vim%vhostname%/www;
index index.php;
root /usr/home/projects/%vim%vhostname%/www;
}
location ~ \.(php|cgi|html)$ {
proxy_pass http://localhost:8080;
Expand All @@ -21,5 +26,34 @@ server {
deny all;
}
}
# server {
# listen 443;
# server_name %vim%vhostname% www.%vim%vhostname%;
#
# ssl on;
# ssl_protocols SSLv3 TLSv1;
# ssl_certificate /usr/local/etc/ssl/www/%vim%vhostname%.crt;
# ssl_certificate_key /usr/local/etc/ssl/www/%vim%vhostname%.key;
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# root /usr/local/www/nginx-dist;
# }
# location / {
# index index.php;
# root /usr/home/projects/%vim%vhostname%/www;
# }
# location ~ \.(php|cgi|html)$ {
# proxy_pass http://localhost:8080;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-for $remote_addr;
# proxy_redirect off;
# proxy_set_header Host $host;
# proxy_set_header COUNTRY $country;
# }
# location ~ /\.ht {
# deny all;
# }
# }

# vim: ft=nginx ts=4

0 comments on commit a65fec9

Please sign in to comment.