Search code examples
xampp

How to remove port 8080 in xampp?


What are the configurations that i have to do to have this :localhost/Name/ instead localhost:8080?

What can i do in this situation?

Exenple localhost:8080/NoName/View/LogRegister/LogRegisterForm.php is my originial link and I want to have the following link:

localhost/NoName/View/LogRegister/LogRegisterForm.php

Thank you


Solution

  • It's not "PHP" - that's the language being used. XAMPP usually uses Apache for its web server, and it's the web server that determines the port.

    Look for http.conf. Edit it, and change the port to "80". Here are more details:

    How to change XAMPP apache server port?

    I believe you might also be able to use "xampp.ini":

    Busy... Apache started [Port 80]


    Addendum

    I don't think you understand. There's ALWAYS a "port".

    If you don't specify the port, it defaults to "80" (for http) or "443" (for https).

    Examples:

    1. http://localhost:8080/index.php: you're explicitly saying "index.php" and "port 8080".

    2. http://localhost/index.php: port 80 is implicit.

    3. http://localhost:80/index.php: port 80 is explicit. Examples 2) and 3) are EQUIVALENT. And finally,

    4. http://localhost implies a) port 80, and b) index-dot-something: index.html, index.htm, index.php, index.jsp, etc. - whatever you've configured as a "default page".