By jerrymouse
I cloned a LAMP Ubuntu 16.04 droplet. I was provided a droplet IP address which pointed me to the static message “Please log into your droplet via SSH to configure your LAMP installation.” which was the text in the file “/var/www/html/index.html”, powered by “/etc/apache2/sites-available/000-default.conf”
Now I followed https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts and created an additional virtualhosts and corresponding DocumentRoots, enabled them and disabled the default “000-default.conf”. I have one main domain (say siteA.com), and several other domains co-hosted on the same droplet. If someone types the IP address I want server to render siteA. How do I make it happen?
Additional Info:
The requested URL / was not found on this server. when typing the IP address. This is obviously because I disabled 000-default.confapache2ctl -S:
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex watchdog-callback: using_defaults
Mutex default: dir=“/var/lock/apache2” mechanism=fcntl
Mutex mpm-accept: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“www-data” id=33 not_used
Group: name=“www-data” id=33 not_usedThis 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!
Accepted Answer
Aaaaah my bad! The problem was a typo in DocumentRoot of siteA.com conf file. Instead of /var/www/siteA.com/public_html, I typed /var/www/html/siteA.com/public_html
Problem stands resolved.
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.