Hosting 2 Sites - Can't get 2nd domain pointed correctly

I am trying to host two sites on my linode.

I have the first one set up and running a wp installation at

home/rws/public_html//

The second site should point to

home/rws/public_html//

…but, I have the second domain pointing to my linode nameservers, but when I try to browse to that domain in a browser, i arrive at the first domain.

Does anyone know what step I may have missed, or a good document/tutorial/help article that may help me get it straightened out?

What should I be looking for?

2 Replies

@rws:

What should I be looking for?

VHOST setup

Thanks vonskippy,

I've double checked everything, have created all the files/entries for the second domain, but when trying to hit in in the browser, I still get a redirect to my first domain.

I've done the following for each (replacing the with my real domain, etc…):

sudo nano /usr/local/nginx/sites-available/<domain1>.com</domain1>

and in those files:

server {

            listen   80;

            server_name  www.someDomain.com;

            rewrite ^/(.*) http://someDomain.com/$1 permanent;

       }

server {

            listen   80;

            server_name someDomain.com;

            access_log /home/USERNAME/public_html/someDomain.com/log/access.log;

            error_log /home/USERNAME/public_html/someDomain.com/log/error.log;

            location /  {

                        root   /home/USERNAME/public_html/someDomain.com/public/;

                        index  index.php index.html;

                        }

            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

            location ~ \.php$

                        {

            fastcgi_pass 127.0.0.1:9000;

            fastcgi_index index.php;

            include /usr/local/nginx/conf/fastcgi_params;

            fastcgi_param SCRIPT_FILENAME /home/USERNAME/public_html/someDomain.com/public/$fastcgi_script_name;

                        }

       }

Having one for each of the two sites, it still doesn't work.

Is there anything that I may be missing to get this working? I'm not really sure what the best troubleshooting steps are in this case.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct