Skip to content

Instantly share code, notes, and snippets.

@JrogeT
Last active June 5, 2024 15:04
Show Gist options
  • Save JrogeT/1f9bb1b08b9f3ee3ead2e359e2f798e4 to your computer and use it in GitHub Desktop.
Save JrogeT/1f9bb1b08b9f3ee3ead2e359e2f798e4 to your computer and use it in GitHub Desktop.
xampp windows configuration to host php project
# "xampp/apache/conf/extra/httpd-vhosts.conf"
# "/opt/lampp/etc/extra"
<VirtualHost *:80>
DocumentRoot "C:/Projects/Php/Test/public"
ServerName test.localhost
</VirtualHost>
in ubuntu:
sudo vi /opt/lampp/etc/httpd.conf
line 487 should be
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
sudo vi /etc/hosts
add a new one
127.0.0.3 helloworld
<VirtualHost 127.0.0.5:80>
DocumentRoot "/opt/lampp/htdocs/my-first-project"
DirectoryIndex index.php
<Directory "/opt/lampp/htdocs/my-first-project">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# If your project path it's in htdocs, you can ignore this step
# "xampp\apache\conf\httpd.conf"
# Added by me
DocumentRoot "C:/Projects/Php"
<Directory "C:/Projects/Php">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment