Hello, I have a Ubuntu 14.04 server with LEMP Stack and vargrant installed. My website runs on wordpress. My website was running fine. When I did ssh login to my server, the server displayed that there are some Security Updates available. So I Upgraded the server:
sudo apt-get update;
sudo apt-get upgrade;
During the Upgrade it asked whether to install a new configuration for nginx or keep the remaining one. I typed ‘N’. The upgrade went fine.
But when I access my website, it is displaying the blank page.
I ran the following command too:
sudo nginx -t
I get the following message:
nginx: [warn] server name “http://domain.com” has suspicious symbols in /etc/nginx/sites-enabled/domain:29 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Please help me out.
Thanks, Tushar
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Are you using PHP-FPM?
Try adding this to your config:
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
Hello all. After updating/upgrading nginx and my ubuntu 14.04, this happened to one of my sites. What worked for me was placing “fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;” at the end of my location block. Afterwards, I ran sudo service nginx restart and it was back up. Here is my whole config for reference
server {
listen 80;
listen [::]:80;
## root /var/www/great-create.com/public_html/nodejs/project;
root /var/www/great-create.com/public_html;
index index.php index.html index.htm;
server_name great-create.com www.great-create.com;
## server_name localhost;
#location / {
# try_files $uri $uri/ =404;
#}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# With php5-cgi alone:
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location /dev {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection ‘upgrade’;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.