Mastering Development System & Network

Apache and Virtual host returning NOT FOUND


apache httpd.conf

I changed #Include conf/extra/httpd-vhosts.conf to Include conf/extra/httpd-vhosts.conf. Then, in


I add this

<VirtualHost *:80>
    DocumentRoot "c:/Apache24/htdocs/drw-framework-master/public"
    ServerAdmin webmaster@localhost
    ServerName www.drw.localhost
    ServerAlias drw.localhost
    ErrorLog c:/Apache24/htdocs/logs/error.log
    Loglevel warn
    CustomLog c:/Apache24/htdocs/logs/access.log combined
    SetEnv APPLICATION_ENV "development"

    <Directory C:/Apache24/htdocs/drw-framework-master/public>
        DirectoryIndex index.php
        AllowOverride All
        #Require all granted
        Order allow,deny
        Allow from all

And finally, in

hosts file

in windows/system32/driver I added this to the file drw.localhost.

When I visit drw.localhost in the browser, it loads the default page but when I tried to visit other pages, it always returned

error 404. NOT Found

Infact, this is the error

Not Found
The requested URL /register/new was not found on this server.

Meanwhile, inside the public folder, I have this code in the


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !d
RewriteRule ^.*$ index.php [NC,L,QSA]


This is what is inside the


after viewing it

::1 - - [23/May/2020:14:35:26 +0100] "GET /register/new HTTP/1.1" 404 210 "http://drw.localhost/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36"


I want to know where I go wrong in my configurations?

NB: Am running this on windows 8.1

Leave a Reply

Your email address will not be published. Required fields are marked *