Question

Ubuntu 16.04 Apache2 multiple websites

I’ve follow everything to the letter for the tutorial sudo a2ensite olmacdoanldsfarm.com /var/www/html already enabled sudo a2ensite peapatchrvpark.com /var/www/peapatch/ already enabled sudo a2ensite redpoppyrentalhall.com /var/www/redpoppy/ already enabled sudo dissite default already disabled etc/hosts 127.0.0.1 olmacds localhost 192.168.1.29 olmacdonaldsfarm.com 192.168.1.29 peapatchrvpark.com 192.168.1.29 redpoppyrentalhall.com 192.168.1.29 is the address of my server on my private network 65.245.187.152 is the address of my public ip it serves olmacdonaldsfarm.com just fine not the other two ive tried everything I have given up

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@hansen Thank you for your time .

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

this article was for only VH. You made a New Article :-)

127.0.0.1 localhost 127.0.1.1 guest-desktop your_server_IP example.com your_server_IP test.com

in multiple domain hosts file need to be edit in apache2/ubuntu

okay I found the issue you were talking about http://http:// that’s at godaddy.com forwarding, I fixed that now my server serves same index for all three sites

redpoppyrentalhall.com.conf

<VirtualHost *:80> ServerName www.redpoppyrentalhall.com ServerAlias redpoppyrentalhall.com ServerAdmin bwhited@olmacdonaldsfarm.com DocumentRoot /var/www/redpoppy <Directory /> Options Indexes FollowSymLinks MultiViews AllowOverride None </Directory> <Directory /var/www/redpoppy/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>