www.tudo.re 1.38 KB
Newer Older
Daniel STAN's avatar
Daniel STAN committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
server {
    listen 443;
	listen [::]:443;
	server_name www.tudo.re;

	root /home/dstan/scripts-perso/www.tudo.re;
	index index.html index.htm;

	ssl on;
	ssl_certificate /etc/letsencrypt/live/www.tudo.re/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/www.tudo.re/privkey.pem;

	ssl_session_timeout 5m;

	ssl_protocols SSLv3 TLSv1;
	ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
	ssl_prefer_server_ciphers on;

Daniel STAN's avatar
Daniel STAN committed
19 20 21 22 23 24 25 26 27 28 29
    location @todjango {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        # try_files $uri $uri/ /index.html;
        # Uncomment to enable naxsi on this location
        # include /etc/nginx/naxsi.rules
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_pass http://localhost:8080;
    }

Daniel STAN's avatar
Daniel STAN committed
30 31 32 33 34
	# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
	#
	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
	
35
		# With php-fpm:
Daniel STAN's avatar
Daniel STAN committed
36
		fastcgi_pass unix:/run/php/php7.3-fpm.sock;
Daniel STAN's avatar
Daniel STAN committed
37
	}
Daniel STAN's avatar
Daniel STAN committed
38 39

    location / {
Daniel STAN's avatar
Daniel STAN committed
40 41 42 43 44 45
        default_type "text/html";
        try_files $uri/index.html $uri/index.php $uri @todjango;
    }
    
    location /plantes/ {
        default_type "image/jpeg";
Daniel STAN's avatar
Daniel STAN committed
46 47 48 49 50
    }

    location /static {
        alias /home/dstan/scripts-perso/www.tudo.re/homepage/collected_static;
    }
Daniel STAN's avatar
Daniel STAN committed
51 52 53 54

    location /adminer {
	alias /usr/share/adminer/adminer;
   }
Daniel STAN's avatar
Daniel STAN committed
55 56
	
}