Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Feb 12, 2018 8:26 am 
Offline
Newbie

Joined: Mon Feb 12, 2018 8:18 am
Posts: 2
Hi All!

I just started with my linode, I'm still a noob but wanted to give it a go. I followed the linode LEMP documentation and I added 2 domains on my linode.

1. cloudening.com
2. vaughancorp.com

Now the weird thing is when I go to vaughancorp.com I can see the website normally. But now when I go to www.vaughancorp.com I can see the index.php file of cloudening.com.
Quote:
I did a: tail /var/log/nginx/error.log and this is the result:
2018/02/12 20:57:11 [error] 14017#14017: *20 directory index of "/var/www/html/cloudening.com/public_html/" is forbidden, client: 49.xxx.xxx.xxx, server: cloudening.com, request: "GET / HTTP/1.1", host: "www.vaughancorp.com"
So the above error log is showing that it's accessing the public_html folder of cloudening

But the Nginx virtual host settings for vaughancorp.com is:
Code:
server {
        listen 80;
        listen [::]:80;

        server_name vaughancorp.com;

        root /var/www/html/vaughancorp.com/public_html;
        index index.php index.html;

        location / {
                try_files $uri $uri/ =404;
        }
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                include fastcgi_params;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                fastcgi_param SCRIPT_FILENAME /var/www/html/vaughancorp.com/public_html$fastcgi_script_name;
        }
}
So it got me thinking that it might be on my domain manager, so what I did was I deleted the A record of hostname www and then added a cname of www that points to vaughancorp.com, but still did not work.

Now if I view cloudening.com and www.cloudening.com it shows the correct files/page.

And now if I go to www.vaughancorp.com it shows me the cloudening.com index.php file?

Your thoughts? Thanks!


Top
   
PostPosted: Mon Feb 12, 2018 8:49 am 
Offline
Newbie

Joined: Mon Feb 12, 2018 8:18 am
Posts: 2
Okay never mind, I fixed this by adding:

server_name vaughancorp.com www.vaughancorp.com;

Hope this helps newbies like me.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group