Configuring EE Nginx to work with multiple sites. 403 error. help.

Posted March 9, 2015 5.3k views
Linux BasicsNginxUbuntuWordPressDigitalOceanDNSLinux Commands

Hi there, today i created a new droplet with Ubuntu 14.04. Than i installed EasyEngine by typingwget -qO ee && sudo bash ee

Okay, that worked well.

Tried to access my website through droplets IP adress -
It works well and showed me nginx welcome page.

Than i wanted to create a simple site with php and mysql support and typed - ee site create --mysql

That also went well ,but the problem is, i cant access it. But i want that is the main site for my droplet. So i moved the folder into html folder and changed the /etc/nginx/sites-available/default.conf this line - root /var/www/html; to this line root /var/www/html/; but now i am getting 403 forbidden error.

So basicly what i need is that accessing my droplets IP ( , later gonna changed it to a domain) i access my folder, because it’s configured to have php and mysql support and use it as a multisite.

For example. I created another website with EE , but this time with pre-installed wordpress. ee site create --wpsubdir --wpfc and it created a folder named in /var/www/ folder , but what i want is to move that site in folder (because that is the main folder for my website) and access it trough my droplets ip, in this case - , because i’m gonna create and host for a while multiple websites.

But so far i am getting 403 forbidden errors. Can somebody help me with this, please?

  • Assuming that your configuration is correct and nginx is looking in the correct directory can you check what user owns your web files. You should ensure (on Ubuntu) that these web files are owned by the same user account nginx is running as (www-data). You can do this with the following command:

    chown -Rf www-data:www-data /var/www/html/
  • Believe it or not, but nothing is happening when i write that command. Anyway, this still dont work for me. Maybe it has something to do with domains? And i can only access those sites when i use domain which matches folder name? Anyway, i dont know and i need it to work with droplets IP address.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Okay, the is working now and it’s set in /var/www/html/ , thats good. But the WP site is not working, getting 403 error. And it’s placed in /var/www/html/ folder and i need it to work like