XAMPP's default port:80 is occupied by System.exe, so I have to switch to port:81, as this question suggested XAMPP PORT 80 is Busy / EasyPHP error in Apache configuration file:
After this change, I can access localhost:81/xampp and localhost:81/phpMyAdmin , as well as local files, like localhost:81/wordpress/Readme.html
However, I can not load other local directories in htdocs, can not install new wordpress site on my computer, and localhost:81/wordpress is auto referred back to localhost/wordpress , which is NOT FOUND
Here's a list of what I tried and failed
Change all localhost options to locahost:81, in C:\\xampp\\apache\\conf\\http.conf , in C:\\xampp\\xampp-control.ini , in MySQL Database, Database Tables, root User, in wordpress wp-config-sample.php , wp-config.php
I load localhost:81\\wordpress in Chrome and it is auto referred back to localhost\\wordpress , the result is NOT FOUND.
So I can not access to localhost:81/mywebsite because it is auto referred to the old localhost , and can not stop System.exe from using port:80. I searched almost every where, but the only solution I found is a mistyped mistake in wp-config.php - that is NOT my problem.
Plese help.
Try specifying port number in virtual host configuration. Hence you can avoid typing port number in url. Add these lines to C:/xampp/apache/config/extra/httpd-vhosts.conf
NameVirtualHost *:81
<VirtualHost *:81>
ServerName test.com
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Edit C:\\Windows\\System32\\drivers\\etc\\hosts and Add
127.0.0.1 test.com
at the end of file. Restart apache. clear browser cache and just point to test.com.
I uninstalled ISS , uninstalled XAMPP and reinstall XAMPP again, and it worked with port:80 as default. Thank you all. About the service that occupied port:80, it is answered in this question: windows 8 NT Kernel and System using port 80
So, the best solution like EL.Web.ID and Geethika says, is to reconfigure the XAMPP Apache server to listen and use different port numbers. Here is how you do it:
1) First, you need to open the Apache “httpd.conf” file and configure it to use/listen on a new port no.'
To open httpd.conf file, click the “Config” button next to Apache “Start” and “Admin” buttons. In the popup menu that opens, click and open httpd.conf
2) Within the httpd.conf file search for “listen”. You'll find two rows with something like;
Listen 80
Change the port no to a port no. of your choice (eg port 1234) like below
Listen 1234
3) Next, in the same httpd.conf file look for “ServerName localhost:” Set it to the new port no.
ServerName localhost:1234
4) Save and close the httpd.conf file.
5) Now click the Apache config button again and open the “httpd-ssl.conf” file.
6) In the httpd-ssl.conf file, look for “Listen” again. You may find:
Listen 443
Change it to listen on a new port no of your choice. Say like:
Listen 1443
7) In the same httpd-ssl.conf file find another line that says, “”. Change this to your new port no. (like 1443)
7) Also in the same httpd-ssl.conf you can find another line defining the port no. For that look for “ServerName”. you might find something like:
ServerName www.example.com:443 or ServerName localhost:433
Change this ServerName to your new port no.
8) Save and close the httpd-ssl.conf file.
9) Finally, there's just one more place you should change the port no. For that, click and open the “Config” button of your XAMPP Control Panel. Then click the, “Service and Port Settings” button. Within it, click the “Apache” tab and enter and save the new port nos in the “main port” and “SSL port” boxes. Click save and close the config boxes.
That should do the trick. Now “Start” Apache and if everything goes well, your Apache server should start up.
You will also see the Apache Port/s no in the XAMPP control panel has change to the new port IDs you set 🙂
Write on URL Like localhost:1234 then eter it....
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.