www.tudo.re 1.23 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 36
		# With php-fpm:
		fastcgi_pass unix:/run/php/php7.0-fpm.sock;
Daniel Stan's avatar
Daniel Stan committed
37
	}
Daniel Stan's avatar
Daniel Stan committed
38 39 40

    location / {
        default_type "text/plain";
41
        try_files $uri/index.html $uri @todjango;
Daniel Stan's avatar
Daniel Stan committed
42 43 44 45 46
    }

    location /static {
        alias /home/dstan/scripts-perso/www.tudo.re/homepage/collected_static;
    }
Daniel Stan's avatar
Daniel Stan committed
47 48
	
}