Ask Your Question
2

How can I access apache2 on a non-standard port without having to include the port number in the URL?

asked 2021-05-14 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-29 16:00:00 +0000

nofretete gravatar image

To access apache2 on a non-standard port without having to include the port number in the URL, you can use a reverse proxy.

Here are the steps:

  1. Set up a reverse proxy on port 80 that forwards requests to your apache2 server on the non-standard port. You can use Apache's mod_proxy module for this.

  2. Configure your virtual host settings in Apache to listen on port 80 and set the ServerName/ServerAlias to your desired domain name.

  3. Restart Apache2 to apply the changes.

Now, when someone visits your website using the domain name you set in step 2, the reverse proxy will automatically forward the request to Apache2 running on the non-standard port. This means that visitors won't need to include the port number in the URL to access your website.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-05-14 11:00:00 +0000

Seen: 8 times

Last updated: May 29 '21