Page 1 of 1

How to change port 80 to 8080 ?

PostPosted: 05. November 2019 10:52
by RobertMichaelin
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.

Re: How to change port 80 to 8080 ?

PostPosted: 05. November 2019 11:02
by Altrea
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>

Re: How to change port 80 to 8080 ?

PostPosted: 05. November 2019 11:52
by RobertMichaelin
Thanks Mr/Mrs Altrea !
But It don't run when I repalce errors, Could you tell me more clearly ?
Thanks.

Re: How to change port 80 to 8080 ?

PostPosted: 05. November 2019 12:24
by Nobbie
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).