xampp change document root
Asked Answered
X

3

10

I have eclipse IDE and I have set up a workspace in "C:/users/matt/documents/web/". I set up a project called test in the folder test "C:/users/matt/documents/web/test". I have changed the Document root in the httpd file to "C:/users/matt/documents/web/" and the same for

I put "C:/users/matt/documents/web/test" into the browser but I can't access the files in the workspace, same for http://localhost/xampp/web/test/, http://localhost/web/test/ and http://localhost/test/.

I'm out of my depth with server configurations, please help!

Xuthus answered 14/4, 2012 at 21:1 Comment(2)
have you restarted the webserver after changing the document root?Rugose
SOrry for my answer I misread the question about the Document root and how you changed this. Zolex was right!Motorcycle
S
20

c:\XAMPP\apache\conf\httpd.conf

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot C:/users/matt/documents/web/
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory C:/users/matt/documents/web/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

Restart apache web server, then ... Enter: http://localhost/test

Check past question

Showiness answered 14/4, 2012 at 21:15 Comment(1)
add closing tags at the end </VirtualHost>Silica
R
9

Restart your webserver after changing its config!

Rugose answered 14/4, 2012 at 21:14 Comment(0)
C
8

Make sure you change DocumentRoot in your\path\to\apache\conf\extra\httpd-ssl.conf as well.

Confluence answered 26/8, 2014 at 22:3 Comment(1)
I was (incorrectly) chasing 403 permission issues until I did this, thanks!Percaline

© 2022 - 2024 — McMap. All rights reserved.