How to change port 80 to 8080 ?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to change port 80 to 8080 ?

Postby RobertMichaelin » 05. November 2019 10:52

Hi All !
Sometime, my Webserver have Port Conflict, I think port 80 used by another app. So, I changed port 80 (default) to 8080 in :
1. in file httpd.conf
2. Service and Port setting (Xampp Control Panel)
3. in httpd-vhosts.conf:

NameVirtualHost *:8080

<VirtualHost *:8080>
ServerName localhost
DocumentRoot C:/xampp/htdocs
</VirtualHost>

<Directory "C:/xampp/">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:8080>
ServerName domain:8080
ServerAlias domain:8080
DocumentRoot C:/xampp/htdocs/dir-name
</VirtualHost>

4. In setting of website: WebsiteName:8080

but not run !
Pls help me, tell me any error to do.
Best Regards.
RobertMichaelin
 
Posts: 6
Joined: 05. November 2019 10:38
XAMPP version: 7.3
Operating System: windows

Re: How to change port 80 to 8080 ?

Postby Altrea » 05. November 2019 11:02

RobertMichaelin wrote:NameVirtualHost *:8080

<VirtualHost *:8080>
ServerName localhost
DocumentRoot C:/xampp/htdocs
</VirtualHost>

<Directory "C:/xampp/">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all

</Directory>
<VirtualHost *:8080>
ServerName domain:8080
ServerAlias domain:8080

DocumentRoot C:/xampp/htdocs/dir-name
</VirtualHost>


Errors in red.

Correction:
Code: Select all
<VirtualHost *:8080>
    ServerName localhost
    DocumentRoot C:/xampp/htdocs
</VirtualHost>

<VirtualHost *:8080>
    ServerName domain
    DocumentRoot C:/xampp/htdocs/dir-name
    <Directory "C:/xampp/htdocs/dir-name">
        Options Indexes FollowSymLinks MultiViews ExecCGI
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 9902
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: How to change port 80 to 8080 ?

Postby RobertMichaelin » 05. November 2019 11:52

Thanks Mr/Mrs Altrea !
But It don't run when I repalce errors, Could you tell me more clearly ?
Thanks.
RobertMichaelin
 
Posts: 6
Joined: 05. November 2019 10:38
XAMPP version: 7.3
Operating System: windows

Re: How to change port 80 to 8080 ?

Postby Nobbie » 05. November 2019 12:24

RobertMichaelin wrote: Could you tell me more clearly ?
Thanks.


Its ON YOU to tell more clearly. What does it mean "but not run"?? Please give us a full description what you enter into the browser, what the browser replies (incl. fully qualified error message).
Nobbie
 
Posts: 11256
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 38 guests