10

I'm having a problem to access my localhost (and finally phpmyadmin) on WAMP.

When I enter localhost or http://127.0.0.1 into my browser, I get the following message:

Forbidden
You don't have permission to access / on this server.

I have seen several other posts about that, where people had the same problem of being unable to access their localhost, and the solution was to edit httpd.conf or phpmyadmin.conf. But I have already tried this and I've had no results, It still says I do not have permission.

Derik
  • 735
  • 1
  • 6
  • 13
  • Please review your question. I've added some placeholders where you should add more information. Things like "that" and "it" and then "just won't work" is a "little" broad. Please share what you enter into your browser, what you expect to happen and what does "won't work" mean? Also the HTML you posted, is it that your browser shows it or is it if you use the view-source-feature of your browser? – hakre Sep 30 '12 at 21:50
  • Just did. Sorry if it was in any way confusing to understand. The html is from view-source, I get the actual message. (I removed the code and put only the message) – Derik Sep 30 '12 at 22:00
  • 1
    So after you changed the port of the server to 8080 you need to enter the following URL: `http://127.0.0.1:8080/` the port number is important if it differs from port 80 for http (that is the standard port) – hakre Sep 30 '12 at 22:02
  • Ok, the page loaded! Now I just want to know how should I proceed? I'll have to type in :8080 every time? Or is there a way to make 8080 default? – Derik Sep 30 '12 at 22:04
  • better check the error log of your sever next time, it tells you when it can not bind on port 80. you have some other webserver running on port 80 already. – hakre Sep 30 '12 at 22:05
  • Yes, but it does not show on CMD, and I alredy changed Skype settings, so I really don't know what could it be. – Derik Sep 30 '12 at 22:06
  • Take a look at this question, it should help you: [How can you find out which process is listening on a port on Windows?](http://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows) – hakre Sep 30 '12 at 22:13
  • ok, so I found out that one process is using that port. But on TCPView it appears like `process: `... Don't know what to do with that, i cant close the process. – Derik Sep 30 '12 at 22:31
  • Run all these tools with Administrator privileges. This is another good tool: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx - if you look on the properties of an application you can see as well which ports are in use (TCP tab). – hakre Sep 30 '12 at 22:34
  • still. It says process. Only info about it is that it is LISTENING and the PID. -- EDIT i could use that other port or this would be no good? – Derik Sep 30 '12 at 22:37
  • Using 8080 is okay. But you should get in the know *what* actually is running currently on port 80. Try with `netstat`, too. – hakre Sep 30 '12 at 22:39
  • And also you should upvote / accept @Darkwaters answer, it's the way to say thank-you here. Without his suggestion, you would not have changed to 8080 and solved your issue. I only left some comments and helped you to improve the question. – hakre Sep 30 '12 at 22:40
  • That is true! The 8080 port actually solved it. Going to accept it! But still, I can't seem to discover what is this mysterious process.... I really don't like having something I dont know what it is on mt machine! This program you recommended doesn't find the process. – Derik Sep 30 '12 at 22:54

1 Answers1

6

You probably have another application that is using port 80. It's usually Skype or Teamviewer. If you have one (or both) of those apps, go into their settings and turn off 'use port 80'. It's under advanced settings in both apps if I recall correctly.

If you don't have Skype nor Teamviewer, try finding another application that may be using port 80 and disable it.

To be sure if this is the problem, or if you can't disable port 80 of the other application, try changing WAMP's port to something else, like :8080.

-Edit-
If you're not allowed to access /, but are allowed to access any file, add a .htaccess to the root of your site and add Options +Indexes to that file.

If you're not allowed to access anything, do the same as above, but put this in your .htaccess file:

order allow,deny
allow from all
Darkwater
  • 1,264
  • 1
  • 14
  • 24
  • Changing the `Listen 80` to `Listen 8080` made the tray icon green, but I still do not have permission to acess. – Derik Sep 30 '12 at 21:37
  • Thank you for your answer! If you want to help even more you can read my question's comments cause I still have a problem =/ – Derik Sep 30 '12 at 22:56
  • 1
    To find out which application is using port 80, you can click on the WAMP system tray icon and choose **Apache > Service > Test Port 80**. If everything is working properly, the tool should display something along the lines of `Your port 80 is actually used by: Server: Apache/2.4.9 (Win64) PHP/5.5.12` – andrewtc Nov 29 '14 at 07:14