0

On my clients web server, he has this apache conf file:

rails_passenger_conf

Listen *:80
<VirtualHost *:80>

    # rails public folder
    DocumentRoot /www/myclientdomain.com/public
    ServerName myclientdomain.com
    RailsEnv production

</VirtualHost>

I wanted to add a subdomain to the server for testing purposes so I added a new conf file that apache would read:

my_dev_subdomain.conf

Listen *:80
<VirtualHost *:80>

    DocumentRoot /www/dev.myclientdomain.com
    ServerName dev.myclientdomain.com

</VirtualHost>

And upon using apachectl --configtest I get this:

[warn] _default_ VirtualHost overlap on port 80, the first has precedence
(98)Address already in use: make_sock: could not bind to address [::]:80

Now, I'm obviously no apache expert. I'm just a web developer but I thought I knew enough about web administration to get a basic subdomain running... apparently not. Can anyone point me in the right direction?

EEAA
  • 109,363
  • 18
  • 175
  • 245
Jake Wilson
  • 8,814
  • 29
  • 97
  • 125

1 Answers1

1

You only need one "Listen *:80" in your apache config. Get rid of the one in your subdomain config file and that should take care of it.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • That worked, thanks! However after a index.html in the document root I get this error in my browser: Error 101 (net::ERR_CONNECTION_RESET): Unknown error. Any thoughts? – Jake Wilson Nov 21 '09 at 06:22
  • You have a screenshot of that? A 101 error *is* a valid http error code, but it's not indicitave of a connection reset, which is what looks like you have going on. What browser are you using? I googled that error, and saw a lot of Chrome users posting about the same error. – EEAA Nov 21 '09 at 06:28
  • Yes using Chrome. Tried it with Firefox and I get "The connection was reset" error. My DocumentRoot and the index.html both have 755 permissions. I don't need to add this subdomain to my host file do I? – Jake Wilson Nov 21 '09 at 06:44
  • No, if you're getting a connection reset error, your browser is resolving the name correctly. Are you using a proxy of any sort? – EEAA Nov 21 '09 at 06:46
  • No proxy. My Googling of this error was refering to Proxy setups and stuff like that. But I'm not using using any proxy or special web connection. Just a cable modem with my cable ISP. Nothing fancy. – Jake Wilson Nov 21 '09 at 06:56
  • Well then, I'm not sure what's causing the error. Have you checked the apache error_log? – EEAA Nov 21 '09 at 07:09
  • Ya I was just doing that. No errors showing up in either the error or access log. – Jake Wilson Nov 21 '09 at 07:10