Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have configured apache to run alongside with nginx on port 8080.

For some odd reason, I also have a wildcard domain defined at my DNS server, I've checked it, and it works( still points to correct IP).

For some odd reason when I am trying to create virtual hosts for sites such as or, it won't work.

Example VirtualHost code from sites-available dir:

<virtualhost *:8080>

  # Admin email, Server Name (domain name) and any aliases

  # Index file and Document Root (where the public files are located)
  DocumentRoot /var/www/vhosts/
  DirectoryIndex index.php

  # Custom log file locations
  LogLevel warn
  ErrorLog  /var/www/vhosts/
  CustomLog /var/www/vhosts/ combined


Thanks in advance!

share|improve this question
Exactly what doesn't work? – Michael Hampton Jul 17 '13 at 7:36
Apache is not serving the pages at /var/www/vhosts/ – Oleg Tikhonov Jul 17 '13 at 7:38

1 Answer 1

A specific error would be helpful. E.g. a description of the page displayed in your browser. Perhaps you are getting a 404, a forbidden message, the default browser "timeout" message.

Here's a few pointers:

  1. You have specified port 8080 on the servername directive as well as on the Virtualhost directive. While this might not be the source of your problem, it seems pointless. I would remove it.
  2. You have a serverAlias the same as the server name. Again, this seems pointless.
  3. Check that you have adjusted your Listen directive in httpd.conf/apache2.conf so apache is listening on port 8080
  4. If there is a firewall between your webserver and the "outside world" you will need to configure that accordingly.
  5. Check /var/www/vhosts/ for any indication of the problem.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.