logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Addressing local website by port only
Author
Sam Hobbs



Joined: 06 Dec 2021
Posts: 6
Location: USA, California

PostPosted: Wed 08 Dec '21 3:38    Post subject: Addressing local website by port only Reply with quote

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: 7294
Location: Germany, Next to Hamburg

PostPosted: Wed 08 Dec '21 10:04    Post subject: Reply with quote

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: 6
Location: USA, California

PostPosted: Wed 08 Dec '21 10:50    Post subject: Reply with quote

Thank you. That helps.
Back to top


Reply to topic   Topic: Addressing local website by port only View previous topic :: View next topic
Post new topic   Forum Index -> Apache