Answers.Body: <p>Looks like the <code>.htaccess</code> file included with Craft is not being read or you didn't rename it (should be <code>.htaccess</code> with the period at the beginning). </p>
  
  <p>That's why <code>/index.php/admin</code> is working but <code>/admin/</code> is not.</p>
  
  <p>One other possibility is Apache is setup to ignore .htaccess files. If that's the case, add this to your <code>httpd-vhosts.conf</code> file.</p>
  
  <pre><code>&lt;Directory "C:\wamp\www\y-lynx"&gt;
      AllowOverride All
  &lt;/Directory&gt;
  </code></pre>
  
  <p>(If you already have a <code>&lt;Directory "C:\wamp\www\y-lynx"&gt;</code> block, just add in <code>AllowOverride All</code> somewhere inside.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T07:18:59.013Z
Answers.Text: Thanks mate, that was part of the problem :). The real one was that I'm dumb and forgot to check if mod_rewrite was on, which wasn't. Anyway thanks !
Answers.UserDisplayName: ovesco
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T03:25:26.623Z
Answers.LastActivityDate: 2015-05-26T03:25:26.623Z
Answers.UserDisplayName: RitterKnight
Body: <p>I'm trying to setup a virtual host to access my craft project through ontherocks.dev, without any success yet.</p>
  
  <ul>
  <li><strong>www.ontherocks.dev</strong> : correct response</li>
  <li><strong>www.ontherocks.dev/admin</strong> : Apache 404</li>
  <li><strong>www.ontherocks.dev/index.php/admin</strong> : redirected to <em>www.ontherocks.dev/admin/install</em> with an Apache 404</li>
  </ul>
  
  <p>I didnt "install" craft yet, which explains the redirect. Here are my config files for the virtual host :</p>
  
  <h2>httpd-vhosts.conf</h2>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    ServerName ontherocks.dev
    DocumentRoot "C:\wamp\www\y-lynx"
    ServerAlias www.ontherocks.dev
   DirectoryIndex index.php
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <h2>hosts file in system32/drivers/etc</h2>
  
  <pre><code># localhost name resolution is handled within DNS itself.
  #   127.0.0.1       localhost
  #   ::1             localhost
  127.0.0.1       ontherocks.dev
  </code></pre>
  
  <p>Thanks for your help !</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-25T17:03:55.493Z
Comments.Text: Try setting `ServerAlias` to `ontherocks.dev` (minus the www) and access the site using `ontherocks.dev`.
Comments.UserDisplayName: Brad Bell
Tags: <environments><apache>
Title: Using a virtual host result in internal error
ThreadText: # Using a virtual host result in internal error
  
  (Asked by: username_0 on 2015-05-25)
  
  I'm trying to setup a virtual host to access my craft project through ontherocks.dev, without any success yet.
  
  * **www.ontherocks.dev** : correct response
  * **www.ontherocks.dev/admin** : Apache 404
  * **www.ontherocks.dev/index.php/admin** : redirected to *www.ontherocks.dev/admin/install* with an Apache 404
  
  I didnt "install" craft yet, which explains the redirect. Here are my config files for the virtual host :
  
  ## httpd-vhosts.conf
  
  ```
  <VirtualHost *:80>
    ServerName ontherocks.dev
    DocumentRoot "C:\wamp\www\y-lynx"
    ServerAlias www.ontherocks.dev
   DirectoryIndex index.php
  </VirtualHost>
  
  ```
  
  ## hosts file in system32/drivers/etc
  
  ```
  # localhost name resolution is handled within DNS itself.
  #   127.0.0.1       localhost
  #   ::1             localhost
  127.0.0.1       ontherocks.dev
  
  ```
  
  Thanks for your help !
  
  **Tags:** environments, apache
  
  > **Comments:**
  > **username_1**: Try setting `ServerAlias` to `ontherocks.dev` (minus the www) and access the site using `ontherocks.dev`.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-05-26. Score: 2 | Accepted answer
  
  Looks like the `.htaccess` file included with Craft is not being read or you didn't rename it (should be `.htaccess` with the period at the beginning).
  
  That's why `/index.php/admin` is working but `/admin/` is not.
  
  One other possibility is Apache is setup to ignore .htaccess files. If that's the case, add this to your `httpd-vhosts.conf` file.
  
  ```
  <Directory "C:\wamp\www\y-lynx">
      AllowOverride All
  </Directory>
  
  ```
  
  (If you already have a `<Directory "C:\wamp\www\y-lynx">` block, just add in `AllowOverride All` somewhere inside.)
  
  > **Comments:**
  > **username_0**: Thanks mate, that was part of the problem :). The real one was that I'm dumb and forgot to check if mod_rewrite was on, which wasn't. Anyway thanks !  
  
  ---
  
  