0

Recently I've been setting up Apache for a friend (I have't used Apache in ages, I've switched to nginx). Anyway, I was able to set up the server itself, and can connect via "example.com". However, connecting via "www.example.com" does not work. The server times out.

Also, we have a NodeBB forum set up and I followed their instructions to set up Apache as a Proxy for "forum.example.com", and this times out as well.

Essentially, all subdomains don't work, but the direct domain does.

Here is my virtual host file:

    <VirtualHost *:80>

            ServerName example.com

            ServerAlias www.example.com



            ServerAdmin webmaster@localhost

            DocumentRoot /var/www/html


            ErrorLog ${APACHE_LOG_DIR}/error.log

            CustomLog ${APACHE_LOG_DIR}/access.log combined


    </VirtualHost>



    ProxyRequests off

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass /socket.io/1/websocket ws://forum.example.com:4567/socket.io/1/websocket
    ProxyPassReverse /socket.io/1/websocket ws://forum.example.com:4567/socket.io/1/websocket

    ProxyPass /socket.io/ http://forum.example.com:4567/socket.io/
    ProxyPassReverse /socket.io/ http://forum.example.com:4567/socket.io/

    ProxyPass / http://forum.example.com:4567/
    ProxyPassReverse / http://forum.example.com:4567/

The proxy is for the forum software to use. If you need anything else, feel free to ask!

Edit: I am 100% positive that my DNS settings are correct as well.

1
  • @krisFR I did that.
    – mattrick
    Oct 25, 2014 at 21:24

1 Answer 1

0

It looks to me like you have only bound example.com and www.example.com to the virtual host. You probably need to add a directive "NameVirtualHost *:80" to apache2.conf or similar to your apache config.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .