Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run my php files from outside htdocs

I have my xampp installed and running sites from the htdocs folder. I want to create a website directory in a different location and run the files online from there.

I know I can do this somehow using both Virtual Host settings and changing my hosts file in System32.

I want to change my URL from localhost/websites/mysite/ to just mysite/

Can anyone offer assistance, thank you

like image 869
Pierce McGeough Avatar asked Dec 26 '22 21:12

Pierce McGeough


1 Answers

Locate httpd.conf file on your local XAMPP install: C:\xampp\xampp\apache\conf\httpd.conf

Edit the “DocumentRoot” line to the location of the remote \htdocs folder.

Example: “C:/xampp/xampp/htdocs” to “C:/Users/Ann/Documents/My Dropbox/Dev/Xampp/xampp/htdocs”

Edit the “Directory” tag to the same remote location you set for DocumentRoot.

“C:/Users/Ann/Documents/My Dropbox/Dev/Xampp/xampp/htdocs”

Save the file and restart your local Apache server.

Navigate to your "localhost” in your browser and you should see the remote web site files.

like image 51
D4NI3LS Avatar answered Jan 09 '23 04:01

D4NI3LS