Report this

What is the reason for this report?

Multiple domain on 1 droplet

Posted on October 24, 2012

Anybody have multiple domains set up ?

Having trouble adding another domainto my vps. It’s mdotblog.com Primary domain is studious.net and it is working perfectly, but aditional nothing, not even ‘not found’, just blank like it doesn’t exist at all. Even deleted primary domain and left only mdotblog.com, but nothing still

Having nginx and virtual hosts set up.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

IS this really the Include entry in your nginx.conf? Nginx: #nginx.conf nclude /etc/nginx/sites-enabled/*;

I am thinking it is a typo…but the “i” is missing from include.

I’d suggest you create a nginx .conf file for each domain (assuming your config is in /etc/nginx/conf.d/) <br>Issue the command: nano /etc/nginx/conf.d/1st_domain.conf and put in it the following: <br>server { <br> listen 80; <br> server_name 1st_domain.com www.1st_domain.com; # <-- replace 1st_domain with your domain. <br> root /var/www/1st_domain; <br> index index.html index.htm index.php; <br> client_max_body_size 1000M; <br> <br> location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ { <br> access_log off; <br> expires 30d; <br> } <br> <br> location ~ ^/(data|config|.ht|db_structure.xml|README) { <br> deny all; <br> } <br> <br> include php; <br> <br> location ~ /.ht { <br> deny all; <br> } <br>} <br> <br>and the same for each domain (note that all website files should be stored inside /var/www/) <br>and finally change ownership of the entire dir /var/www to your webserver (usually it’s www-data) <br>Restart nginx, and you’re done :)

There are no issues running multiple domains from a single virtual server. Just need to make sure your DNS entries are correct and you have your nginx config properly setup. <br> <br>You can either paste it here or if you prefer you can open a ticket and we can help you troubleshoot it.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.