• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 24039
  • Last Modified:

XAMPP Apache port change?

Hi,

I have a XAMPP-system, and now there is a need to change the port from 80 to something else. Tried Port and Listen, but the links break. I have phpBB, Moodle, MediaWiki running under XAMPP and URL http://server:newport works fine but for example moodle mainpage after login the links are broken, they still reference to port 80. What is the right way to correct this?

Thanks in advance!

-Olli
0
olliherranen
Asked:
olliherranen
  • 5
  • 3
1 Solution
 
ahoffmannCommented:
edit your httpd.conf:

Listen 8080
# or
Listen 42.42.42.42:8080

then restart your server, obviously
0
 
olliherranenAuthor Commented:
No, it will not work. In Moodle login page, when I enter my username and password and hit "Login", there comes an error page "Can not open http://server/moodle" so it forgets that the port was supposed to be 8080 instead of 80. Now we are getting to my problem.... ;-)

-Olli
0
 
ahoffmannCommented:
silly question: did you adapt the links to connect to port 8080 also?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
olliherranenAuthor Commented:
What do you mean? I presume that the links are relative, so that there really is not everything from http://server.... but only ./dir/file.htm. But I could be wrong, someone can perhaps confirm this?


0
 
olliherranenAuthor Commented:
Ok, there seems to be the whole URL in html-source. Now the question remains "how to get moodle understand the new port IS NOT 80?" I could have 1000 differend moodle-courses there (which I don't, obviously) and that is why editing every single link is not an option.

Cheers,

-Olli
0
 
ahoffmannCommented:
if the links are relative, then it inherits the port
if moodle uses absolute links, then you have to chek its documentation, probably just a simple configuration issue
0
 
r4zv4nCommented:
If all else fails, you can use mod_rewrite to redirect moodle links to the specific port you configured.
0
 
ahoffmannCommented:
> .. you can use mod_rewrite to redirect moodle links to the specific port ..
how should that work if the request was send to a port where no apache is listening?
0
 
ahoffmannCommented:
I believe in my suggestion http:#16797275
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now