Forum Moderators: phranque

Message Too Old, No Replies

Basic Apache2 site setup is not working

         

Jakobud

9:07 pm on Mar 31, 2010 (gmt 0)

10+ Year Member



Sorry that is a horrible thread subject, but I cannot think of a better more descriptive subject.

We are running a Fedora 11 server that is currently hosting some CRM on it. I want to use a VirtualHost directive to add another site to the server.

So I created this conf:

/etc/httpd/conf.d/mysite.ourdomain.com.conf


And here is the content:

<VirtualHost *:80>
ServerName mysite.ourdomain.com
DocumentRoot /www/mysite
ServerAdmin webmaster@ourdomain.com
ErrorLog /var/log/mysite.ourdomain.com-error.log
CustomLog /var/log/mysite.ourdomain.com-access.log common
</VirtualHost>


I restarted apache, getting the following warning:

[warn] NameVirtualHost *:80 has no VirtualHosts


From what I read, this warning is not related and I can ignore it and my site should still be up and running, correct? (I'll troubleshoot this error later if so)

Well I have our DNS server setup to point mysite.ourdomain.com to goto this server. I can ping it and it points to the correct LAN IP, etc.. Now when I try to access it in the browswer I get nothing. It just says Connecting... and never gets there. If I try mysite.ourdomain.com or the IP address, either one doesn't get there.

It's a very simple and basic apache setup so I'm not sure what I'm doing wrong...

Like I said, the other thing that is running on this server is a crm and it's .conf looks something like this:

Listen x.x.x.x:443
<VirtualHost x.x.x.x:443>
ServerAdmin it@ourdomain.com
ServerName crm.ourdomain.com
ErrorLog /var/log/httpd/ourdomain/crm-error.log
CustomLog /var/log/httpd/ourdomain/crm-access.log common
DocumentRoot /www/ourdomain/crm
<IfModule mod_dir.c>
DirectoryIndex /index.php
</IfModule>
</VirtualHost>


There is also some LDAP authentication stuff in that config but I left it out cause I assumed it wasn't necessary to post.

Anyone have any clue where I should start or what settings I can post from httpd.conf that would help?

jdMorgan

3:34 pm on Apr 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I may be mis-reading, but I think you need both 'sites' to be defined in the *one* config file that applies to this Apache server instance... That is, one config file that defines multiple VirtualHosts. You can "include" multiple .conf files in this "master" .conf file, but for servers with only a few vHosts, it's likely simpler to just define all vHosts in the top-level .conf file.

Jim