2

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

Flavius
  • 37
  • 1
  • 6

2 Answers2

5

It's not "PHP" - that's the language being used. XAMPP usually uses Apache for it's 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 thnk 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".

'Hope that helps...

Community
  • 1
  • 1
paulsm4
  • 99,714
  • 15
  • 125
  • 160
  • 2
    I don't thnk you understand. There's *ALWAYS* a "port". Please see my comments above. – paulsm4 Jun 05 '16 at 16:35
  • 2
    @FlaviusPintican: read carefully -> Point 2 above: `http://localhost/index.php: port 80 is implicit.` **is implicit** – briosheje Jun 05 '16 at 16:41
  • i set change port 8080 to 80 and this port is default for xampp and it is hidden in url link thank you a lot – Flavius Jun 05 '16 at 20:18
  • It's hard to tell if the OP's question is really being addressed here. It sort of is, but the specific answer of "how to" isn't being given. The OP doesn't want to use port 80. The OP wants to keep port 8080, but not have to spell it out in the URL. In other words, keep 8080 as the port, but enter localhost instead of localhost:8080. – TARKUS May 25 '17 at 13:44
1

When you are using a Virtual Host, then you should look for a file called httpd-vhosts.conf. There you can just look for the desired Virtual Hostand change the port.

Note: Maybe the Virtual Hostis placed in your main apache config. Then look for a file called httpd.confand change it there.

Note 2: The default port is 80, so replace 8080with 80. Then you can just write localhost/path/to/file

Axel
  • 518
  • 6
  • 15
  • 1
    I get the sense the OP wants to keep port 8080, but not have to spell it out in the URL. In other words, keep 8080 as the port, but enter http://localhost instead of http://localhost:8080 . – TARKUS May 25 '17 at 13:42