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
olliherranenAsked:
Who is Participating?
 
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
 
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
ahoffmannCommented:
silly question: did you adapt the links to connect to port 8080 also?
0
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.