I’m trying to start a WordPress site on my Debian server, using Nginx and php5. I followed different tutorials but stuck : the server is responding 200 http responses to any url typed from the domain name, mes-affaires doot xyz . My browser is showing a blank page, but no error too.
As the server is responding 200 responses I’m not getting any error log in the Nginx log files which is a problem to know what to do.
Any idea why it’s showing a blank screen or how I could spot the current error?
Thanks
Your problem can be caused by many factors:
Configuring Nginx
Nginx works a little differently from Apache and if you do not use a management panel, the procedure is a bit complicated.
1.
sudo apt-get install nginx php5-fpm mysql mysql-dev
next activate mysqlsudo mysql_install_db
and run the setup scriptsudo /usr/bin/mysql_secure_installation
2. Create a folder in /var/www with your site name (mkdir mess-affaires)
3. go to /etc/nginx/sites-available and create a file with the same name as your domain (
touch mess-affaires.xyz
)4. Open your new file with an editor (
nano mess-affaires.xyz
) and add these lines:4.1. After this you need to link it to your sites-enabled folder using:
Nginx set a default file for example in your sites-available, delete it to avoid the “conflicting server name error”:
4.2. Restart your nginx installation with
sudo service nginx restart
5. Set permission to your folder
sudo chown -R www-data:www-data /var/www/mess-affaires/
and make sure that everyone is able to read your new filessudo chmod 755 /var/www
o to your folder /var/www/mess-affaires and upload the wordpress installation, now you see the website.6. If you do not see anything, go to your terminal and type:
Configuring mysql/phpmyadmin with nginx
WordPress is a web application that require a mysql database, go to install it!
1.
sudo apt-get install phpmyadmin
2.
sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html
3. Now we must now allow the mcrypt module in php
sudo php5enmod mcrypt
4. restart phpfpm
sudo service php5-fpm restart
5. visit http://YOUR_SERVER_IP/phpmyadmin, log-in and create a new database for your wordpress installation
Pages are still blank? Set php error_reporting
To do this you can try two ways:
Set error_reporting from your php files
Open your WordPress index.php and put these lines to the very top of your page (after
Set error_reporting from php5-fpm.conf
Open with an editor your php5-fpm-conf, try one of these directories:
If you sing my guide, you have not the native php installation but php5-fpm and you can configure your .conf file error params like this:
If you use a native php installation, set your config error_reporting like this: