I have installed Centos 6.7 on my virtual box along with Gitlab. I set up gitlab to listen on port 8081. Then I set up nginx to listen on port 80. However after googling for hours and tried some solutions I still get 403 when i tried to access my web page.
I put my index.html file in /var/www/nginxsite.com/public_html directory and change the owner and file permission to look like this:
dx-xr-xr-x root root /
dx-xr-xr-x root root /var
drwxr-xr-x nginx nginx /www
drwxr-xr-x nginx nginx /nginxsite.com
drwxr-xr-x nginx nginx /public_html
drwxr-xr-x nginx nginx /index.html
Here's my /etc/nginx/sites-available/nginxsite.com.conf configuration file:
server{
listen 80;
server_name nginxsite.com www.nginxsite.com
location / {
root /var/www/nginxsite.com/public_html;
index index.html index.htm index.php;
try files $uri $uri/ =404;
}
error page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
then in my host machine (ubuntu 14.04) I added these two line on /etc/hosts file:
192.168.1.130 my.gitlab.com
192.168.1.130 nginxsite.com
Any advice for me guys? Is there any error I made on the config? thanks