Question
Error while creating Virtual Host on Nginx
Hi,
I am currently creating new virtual host on my droplet which is already installed Ghost (blog) via DigitalOcean’s Ghost Application. I tried to set up virtual host using this guide, but it is not working correctly.
My root directory is under var/www
. New config for sites-available
is as below:
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/test;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name arkaraung.me;
}
And also added new domain in /etc/hosts
file. (let say my ip is 111.111.111.111)
111.111.111.1111 arkaraung.me
Please let me know if there is something wrong with my doing. And also please tell me what should I do. Thanks
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.
×
If you want to debug something you ALWAYS want to check your logs. There is usefull information inside here most of the time. Please post the nginx error log.
nginx error log is as below.
And this is what inside
/sites-enabled/ghost
file.Thanks for your help
Allright, please give the output of:
@CrypticDesigns