After building my website, I realized that our RAID is setup so that all of the space is allocated in /home/admin/
folder.
For that reason I copied all of my websites from /var/www/
to /home/admin/www/
. I also chmodded the directories like so:
sudo chown -R root:root /home/admin/www/website.com/public_html
sudo chmod 755 /home/admin/www
I then restarted nginx and all systems showed green, but now I am getting a 403 error upon accessing my websites.
Here is my virtual.conf file:
server {
listen 80;
# listen *:80;
server_name website.com www.website.com;
access_log /home/admin/www/html/website.com/public_html/access.log;
error_log /home/admin/www/html/website.com/public_html/error.log;
location / {
root /home/admin/www/html/website.com/public_html;
index index.php index.html index.htm;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/admin/www/html/website.com/public_html$fastcgi_script_name;
}
}
server {
listen 80;
# listen *:80;
server_name website2.com www.website2.com;
location / {
root /home/admin/www/html/website2.com/public_html/;
index index.php index.html index.htm;
}
}
Thanks!