0

I'm running an apache2 server on a raspberry pi. When i get an error page (404, 500, etc.) or go to an Index Of page, at the bottom it will say: Apache server at (ip/domain) Port (some port, 80 in my case) I'd like to change the port but I don't know how to do that. Can someone help? Thanks.

1 Answer 1

3

change the port in your apache config file and restart apache. Your config file should be under:

/etc/apache2/apache2.conf 

after you have saved the new port to the file, restart your apache with the following command:

sudo service apache2 restart 
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you, but I have one more question; how do I change the default port, when i type in the ip of my server in my browser, it goes to the website and I dont have to add :8080 on the end?
Sry i forgot you also have to change the VirtualHost Entry port for your enabled site under: /etc/apache2/sites-enabled/<yoursite> and restart apache

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.