Note that there are some explanatory texts on larger screens.

plurals
  1. POApache2 multiple name-based virtual hosts on one machine with rails/rack
    primarykey
    data
    text
    <p>Am stuck on configuring apache to serve up two different sites with Name based virtual hosts at:</p> <pre><code>http://experimental/ </code></pre> <p>and</p> <pre><code>http://api.experimental/ </code></pre> <p>On one machine this setup works fine, and apache reports this:</p> <pre><code>apachectl -D DUMP_VHOSTS apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:* is a NameVirtualHost default server experimental (/etc/apache2/sites-enabled/00-nowa.conf:3) port * namevhost experimental (/etc/apache2/sites-enabled/00-nowa.conf:3) port * namevhost api.experimental (/etc/apache2/sites-enabled/00-nowa.conf:15) Syntax OK </code></pre> <p>On the 2nd machine this does not work, both URLS end up pointing to the first app, it's output of the same command is which has additional <em>:</em> lines:</p> <pre><code>apachectl -D DUMP_VHOSTS apache2: apr_sockaddr_info_get() failed for experimental apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Tue May 14 15:36:08 2013] [warn] NameVirtualHost *:80 has no VirtualHosts [Tue May 14 15:36:08 2013] [warn] NameVirtualHost *:80 has no VirtualHosts VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:* experimental (/etc/apache2/sites-enabled/00-nowa.conf:3) *:* api.experimental (/etc/apache2/sites-enabled/00-nowa.conf:15) Syntax OK </code></pre> <p>The vhost files for each machine are this for the <strong>broken</strong> one:</p> <pre><code>&lt;VirtualHost *&gt; ServerName experimental RailsEnv production DocumentRoot /home/nowa/nowa_app/nowa/current/public &lt;Directory /home/nowa/nowa_app/nowa/current/public &gt; Allow from all Options -MultiViews &lt;/Directory&gt; &lt;/VirtualHost&gt; &lt;VirtualHost *&gt; ServerName api.experimental RackEnv production PassengerMinInstances 2 PassengerMaxPoolSize 10 DocumentRoot /home/nowa/nowa_app/services/api_gateway/current/app &lt;/VirtualHost&gt; </code></pre> <p>And <strong>working</strong>:</p> <pre><code>&lt;VirtualHost *&gt; ServerName experimental RailsEnv production DocumentRoot /home/nowa/nowa_app/nowa/current/public &lt;Directory /home/nowa/nowa_app/nowa/current/public &gt; Allow from all Options -MultiViews &lt;/Directory&gt; &lt;/VirtualHost&gt; &lt;VirtualHost *&gt; ServerName api.experimental RackEnv production PassengerMinInstances 2 PassengerMaxPoolSize 10 DocumentRoot /home/nowa/nowa_app/services/nowa_api_gateway/current/app &lt;/VirtualHost&gt; </code></pre> <p>Why is the output of apachectl -D DUMP_VHOSTS different? What have I missed? :C</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload