Skip to content

Instantly share code, notes, and snippets.

@javagrails
Last active July 9, 2021 12:17
Show Gist options
  • Save javagrails/9acb42d95b0d49dcb78fe454da59bff6 to your computer and use it in GitHub Desktop.
Save javagrails/9acb42d95b0d49dcb78fe454da59bff6 to your computer and use it in GitHub Desktop.
How to Setup a Local Static File Server in Windows by XAMPP - M.M. Saleh (Salman)
How to Setup a Local Static File Server in Windows by XAMPP
M.M. Saleh (Salman) - https://github.com/javagrails
total.bk - it may be a file server
1. create a folder for server root path in location [ D:\zfileserver ]
2. Go to the path [D:\xampp\apache\conf\extra]
Open the file [ httpd-vhosts.conf ]
3. Add a code block like
<VirtualHost total.bk:80>
DocumentRoot "D:/zfileserver"
ServerName total.bk
ErrorLog "logs/total.bk-error.log"
CustomLog "logs/total.bk-access.log" combined
<Directory "D:/zfileserver">
# AllowOverride All # Deprecated
# Order Allow,Deny # Deprecated
# Allow from all # Deprecated
# --New way of doing it
Require all granted
</Directory>
</VirtualHost>
4. Than go to the path [C:\Windows\System32\drivers\etc]
Open the file [ hosts ] and
add the line [ 127.0.0.1 total.bk ] at the end of that file
5. Now go to any browser and type http://total.bk you will see the server(local) is running In Sha Allah
6. Image read from this new local server
<img src="launcher1.png" alt="Android" height="42" width="42"> (this will show image 1)
<img src="uploads/launcher2.png" alt="Android" height="42" width="42"> (this will show image 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment