I'm confused about virtual hosts in apache. I've installed LAMP per instructions here https://help.ubuntu.com/community/ApacheMySQLPHP. I've installed webmin and it works fine. I've set up two test e-commerce sites that are working well. I've changed the directories to /home/user/public_html/site1&2 and enabled the sites with the a2ensite command.
1.Is this a2ensite command only in (k)ubuntu or is it standard in apache2?
2. Is the a2ensite command supposed to take the place of editing the httpd.conf file?
(My sites show 404 not found if I don't add virtual hosts to httpd.conf although I get errors when restarting apache) Here is my httpd.conf.
I can't get the sites to work if I use *:80 or 127.0.0.1:80 for both sites therefore the 127.0.0.2&.3 This seems wrong from my reading of the apache2 docs but I can't get it to work otherwise.
I can't get myphpadmin working and I'm trying to install joomla but I don't know where to put the joomla folder for apache to access it. I know /var/www is the standard directory for apache. I tried to a2ensite the joomla without success.
Anyone have any helpful insights?
Thx.
1.Is this a2ensite command only in (k)ubuntu or is it standard in apache2?
2. Is the a2ensite command supposed to take the place of editing the httpd.conf file?
(My sites show 404 not found if I don't add virtual hosts to httpd.conf although I get errors when restarting apache) Here is my httpd.conf.
Code:
ServerName localhost NameVirtualHost 127.0.0.1:80 <VirtualHost 127.0.0.2:80> ServerName [url]http://www.site1.com[/url] DocumentRoot /home/user/public_html/site1 </VirtualHost> <VirtualHost 127.0.0.3:80> ServerName [url]http://www.site2.com[/url] DocumentRoot /home/user/public_html/site </VirtualHost>
I can't get myphpadmin working and I'm trying to install joomla but I don't know where to put the joomla folder for apache to access it. I know /var/www is the standard directory for apache. I tried to a2ensite the joomla without success.
Anyone have any helpful insights?
Thx.
Comment