Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Addressing local website by port only |
|
Author |
|
Sam Hobbs
Joined: 06 Dec 2021 Posts: 7 Location: USA, California
|
Posted: Wed 08 Dec '21 3:38 Post subject: Addressing local website by port only |
|
|
This is for a local website only; it is not for a website to be exposed to the internet. I am using Windows.
I am new to Apache. I am confused about the use of domain names for local websites. I tried a variety of things but then I managed to get a website working using http://localhost:81 as the address. The default website that Apache creates is of course at http://localhost (http://localhost:80).
I just want to know what possible problems there might be. This is not for a production website; it is just a personal website and/or a temporary website for demonstration purposes only.
I added the following to my httpd.conf:
Code: | Listen 81
.
.
.
<Directory "G:/Sam/Documents/Web Site">
AllowOverride None
Options None
Require all granted
</Directory>
<VirtualHost *:81>
DocumentRoot "G:/Sam/Documents/Web Site"
</VirtualHost>
|
And that works. What could be a problem with that? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7360 Location: Germany, Next to Hamburg
|
Posted: Wed 08 Dec '21 10:04 Post subject: |
|
|
Require local is your friend.
Code: |
Listen 81
<VirtualHost *:81>
DocumentRoot "G:/Sam/Documents/Web Site"
<Directory "G:/Sam/Documents/Web Site">
AllowOverride None
Options None
Require local
</Directory>
</VirtualHost>
|
|
|
Back to top |
|
Sam Hobbs
Joined: 06 Dec 2021 Posts: 7 Location: USA, California
|
Posted: Wed 08 Dec '21 10:50 Post subject: |
|
|
Thank you. That helps. |
|
Back to top |
|
|
|
|
|
|