Am trying to host website example.com on my current Ubuntu server.
I have created the directories for it: /var/www/html/example.com/public_html
and within sites-enabled I created example.com.conf
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www/example.com/public_html
<Directory /var/www/example.com/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
</VirtualHost>
Just changed the DNS so it will take a while to make sure that part works.
However, I'm currently using the same server with just the IP address to do some Perl scripts they're called by x.x.x.x/cgi-bin/perlscript.pl
And that part has stopped working.
The error log contains
AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
So since I just set up just the conf file for the domain name based server, did I somehow mess up everything?
Can Ubuntu host two virtual servers where one is domain name based and the other just IP based?
---UPDATE---
The DNS update was quick enough that new domain website, example.com, works. Now I just need to be able to get back to working off my other website based purely on IP address.