Skip to content

Instantly share code, notes, and snippets.

@oozman
Last active September 1, 2022 06:07
Show Gist options
  • Select an option

  • Save oozman/5530016 to your computer and use it in GitHub Desktop.

Select an option

Save oozman/5530016 to your computer and use it in GitHub Desktop.

Revisions

  1. Omar Usman revised this gist May 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion custom-domain-localhost-xampp
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ And add this to the bottom of the file:
    =============

    Step 2:
    Go to [your xampp directory]/apache/conf/httpd-xampp.conf
    Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf

    Step 3:
    Go to the bottom of the file and copy & paste this code:
  2. Omar Usman revised this gist May 7, 2013. No changes.
  3. Omar Usman renamed this gist May 7, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. Omar Usman revised this gist May 7, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion virtualhost
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,9 @@ Step 1:
    Go to: C:\Windows\System32\Drivers\etc\hosts
    And add this to the bottom of the file:

    =============
    127.0.0.1 your.domain.com

    =============

    Step 2:
    Go to [your xampp directory]/apache/conf/httpd-xampp.conf
  5. Omar Usman revised this gist May 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion virtualhost
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ And add this to the bottom of the file:


    Step 2:
    Go to [your xampp directory]/apache/conf/httpd.conf
    Go to [your xampp directory]/apache/conf/httpd-xampp.conf

    Step 3:
    Go to the bottom of the file and copy & paste this code:
  6. Omar Usman revised this gist May 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion virtualhost
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ Go to the bottom of the file and copy & paste this code:

    * Replace [PATH TO YOUR CUSTOM FOLDER] to the folder where your files are located.
    Ex: C:/my/www/folder/
    * you.domain.com must be the same on Step 1 & Step 3
    * your.domain.com must be the same on Step 1 & Step 3


    Step 4:
  7. Omar Usman revised this gist May 7, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion virtualhost
    Original file line number Diff line number Diff line change
    @@ -34,4 +34,5 @@ Step 4:
    Stop Apache on XAMPP, wait for 5 seconds, then click "Start" to start again your Apache.


    If all things go well, you can go to your browser, type your.domain.com and it will now happily point to your custom local folder.
    If all things go well, you can go to your browser, type your.domain.com
    and it will now happily point to your custom local folder.
  8. Omar Usman revised this gist May 7, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions virtualhost
    Original file line number Diff line number Diff line change
    @@ -33,3 +33,5 @@ Go to the bottom of the file and copy & paste this code:
    Step 4:
    Stop Apache on XAMPP, wait for 5 seconds, then click "Start" to start again your Apache.


    If all things go well, you can go to your browser, type your.domain.com and it will now happily point to your custom local folder.
  9. Omar Usman revised this gist May 7, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion virtualhost
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ Go to the bottom of the file and copy & paste this code:
    </VirtualHost>
    =============

    * Replace [[PATH TO YOUR CUSTOM FOLDER] to the folder where your files are located.
    * Replace [PATH TO YOUR CUSTOM FOLDER] to the folder where your files are located.
    Ex: C:/my/www/folder/
    * you.domain.com must be the same on Step 1 & Step 3

  10. Omar Usman created this gist May 7, 2013.
    35 changes: 35 additions & 0 deletions virtualhost
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    Step 1:
    Go to: C:\Windows\System32\Drivers\etc\hosts
    And add this to the bottom of the file:

    127.0.0.1 your.domain.com


    Step 2:
    Go to [your xampp directory]/apache/conf/httpd.conf

    Step 3:
    Go to the bottom of the file and copy & paste this code:

    =============
    <VirtualHost *:80>
    DocumentRoot "[PATH TO YOUR CUSTOM FOLDER]"
    ServerName your.domain.com

    <Directory "[PATH TO YOUR CUSTOM FOLDER]">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
    </Directory>

    </VirtualHost>
    =============

    * Replace [[PATH TO YOUR CUSTOM FOLDER] to the folder where your files are located.
    Ex: C:/my/www/folder/
    * you.domain.com must be the same on Step 1 & Step 3


    Step 4:
    Stop Apache on XAMPP, wait for 5 seconds, then click "Start" to start again your Apache.