modified nginx default conf file
+ added openssl in nginx site conf file + reorganized readme
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
server {
|
||||
# http uses port 80, and https uses port 443
|
||||
listen 443 ssl; # for ipv4.
|
||||
listen [::]:443 ssl; # for ipv6.
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
location / { root /data/www; }
|
||||
location /images/ { root /data; }
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl; # for ipv4, on port 443, specifying that accepted connections should works in ssl mode
|
||||
listen [::]:443 ssl; # for ipv6
|
||||
server_name hulamy.42.fr;
|
||||
ssl_certificate /etc/nginx/cert/hulamy.42.fr.crt # specifies the file with the ssl certificate (self signed here) generated by openssl
|
||||
ssl_certificate-key /etc/nginx/cert/hulamy.42.fr.key # specifies the file with the secret key of the certificate
|
||||
|
||||
root /var/www/html; # contains default nginx index.nginx-debian.html
|
||||
index index.html index.htm index.nginx-debian.html index.php; # defines files that will be used as index (https://nginx.org/en/docs/http/ngx_http_index_module.html)
|
||||
|
||||
server_name localhost;
|
||||
location / {
|
||||
try_files $uri $uri/ =404; # from /etc/nginx/sites-enabled/default : First attempt to serve request as file, then as directory, then fall back to displaying a 404
|
||||
# test
|
||||
root /data/www;
|
||||
}
|
||||
location /images/ {
|
||||
root /data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
hello world !
|
||||
you are on http connection, on port 80, on localhost
|
||||
|
||||
@@ -46,7 +46,7 @@ http { # section for http server directives
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on; # enable gzipping of responses. gzip is an algorithm that compress the data
|
||||
gzip off; # enable gzipping of responses. gzip is an algorithm that compress the data (disabled for security reasons : https://bugs.debian.org/773332)
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
|
||||
Reference in New Issue
Block a user