1

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

  1. 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

  2. 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.

Community
  • 1
  • 1
Hieu Do
  • 31
  • 1
  • 1
  • 6
  • Are you not the least bit concerned that port 80 is *already occupied?* – Linus Kleen May 31 '15 at 07:33
  • did you restarted your server again after doing changes. changes will reflect only when you stop server and restart it. – Serving Quarantine period May 31 '15 at 07:33
  • LinusKleen I'm very upset of port 80, but have no idea why System.exe is using it. @anantkumarsingh I did stop xampp and restart it, still the same. I can access local files like localhost:81\wordpress\ReadMe.html, but can not load old websites folder or other .php files – Hieu Do May 31 '15 at 07:41
  • @LinusKleen port 80 is used by System.exe, described as NT Kernel and system, runned from a file named ntoskrnl.exe in System32 folder. As this question suggests, it is a malware, but I'm not sure. Should I raise another question? http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/nt-kernel-system-using-100-of-cpu/6d2bbe34-c812-4d7d-8288-80a68ca4de92 . – Hieu Do May 31 '15 at 08:15
  • @HieuDo That is highly suspicious. I'm not sure if you've got IIS running and I wouldn't know if IIS is ran by System.exe. If you want to ask a question to clear this up, you might want to ask that at [Super User](http://superuser.com/). – Linus Kleen May 31 '15 at 09:38
  • IIS is installed on my computer. I uninstalled ISS, XAMPP and reinstall XAMPP again and it worked on port:80. Thank you. – Hieu Do May 31 '15 at 10:17

3 Answers3

0

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.

Harikrishnan
  • 8,629
  • 9
  • 75
  • 119
  • I did try what you suggested @Harikrishnan , changed host file in /etc , changed httpd-vhosts.conf file and tried accessing test.com on Google Chrome. Same thing happed: NOT FOUND, just like when I tried to access localhost . Thanks anyway. – Hieu Do May 31 '15 at 08:20
  • Thanks. I uninstalled XAMPP and it worked again. Thank you all. – Hieu Do May 31 '15 at 10:16
0

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

Community
  • 1
  • 1
Hieu Do
  • 31
  • 1
  • 1
  • 6
0

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.'

Setup Xampp Apache

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 12.34.56.78:80

Listen 80

Change the port no to a port no. of your choice (e.g. port 1234) like below

Listen 12.34.56.78:1234

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....

Vivek Bhat
  • 41
  • 1