I used to have a subdomain and a vhosts file for example.mydomain.comit was a separate wordpress site and my main app was a node app behind localhost:8000 . However, when I upgraded from ubuntu 14.04 -> 16.04, that stopped working.I have my node app using HTTPS, so i'm trying to get my wordpress app at mydomain.com/example instead.If I have a index.html page in my example directory, I see the hello world message. I also have a info.php page with just phpinfo(); but I get a 404 not found if even If I try to go to http://ift.tt/2zoLgCe .I'm on the latest nginx, and mysql. Using php 5.6Here's my nginx default confserver { listen 80; server_name mydomain.com www.mydomain.com; # redirect all urls to https return 301 https://$server_name$request_uri; } server { listen 443 ssl; index index.php index.html index.htm; server_name mydomain.com www.mydomain.com; # add Strict-Transport-Security to prevent man in the middle attacks add_header Strict-Transport-Security "max-age=31536000"; # ssl certificate config ssl_certificate /etc/letsencrypt/live/http://ift.tt/1sCsmTd; ssl_certificate_key /etc/letsencrypt/live/http://ift.tt/1XWmnoF; ssl_trusted_certificate /etc/letsencrypt/live/http://ift.tt/29JtI7k; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_dhparam /etc/ssl/certs/dhparam.pem; ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_stapling on; ssl_stapling_verify on; add_header Strict-Transport-Security max-age=15768000; access_log /var/log/nginx/mydomain.com.log; location /.well-known { alias /srv/mydomain/.well-known; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:8000; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /videos { alias /srv/sample/; index index.php index.html index.htm; try_files $uri $uri/ /index.php?q=$uri&$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } }
Submitted November 07, 2017 at 04:41PM by sayurichick
No comments:
Post a Comment