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 :


<VirtualHost *:80>
  ServerName ontherocks.dev
  DocumentRoot "C:\wamp\www\y-lynx"
  ServerAlias www.ontherocks.dev
 DirectoryIndex index.php

hosts file in system32/drivers/etc

# localhost name resolution is handled within DNS itself.
#       localhost
#   ::1             localhost       ontherocks.dev

Thanks for your help !

  • Try setting ServerAlias to ontherocks.dev (minus the www) and access the site using ontherocks.dev.
    – Brad Bell
    Commented May 25, 2015 at 17:03

1 Answer 1


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

(If you already have a <Directory "C:\wamp\www\y-lynx"> block, just add in AllowOverride All somewhere inside.)

  • 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 !
    – ovesco
    Commented May 26, 2015 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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