Just installed xampp and started all services including Apache but still somehow cannot connect to my localhost server still when i write the address 127.0.0.1 it shows that message that it works.
Someone with an idea whats happening
Are you using Windows or Linux (eg., Ubuntu, Debian, Fedora, etc.)?
If you are using Windows 7/8/10, it should work without this steps, but do the following if not working with these Operating Systems:
1) Press Win+R
2) Type notepad, and then press Ctrl+Shift+Enter
3) Click on File, click Open, go to C:\Windows\System32\drivers\etc and click on the hosts file.
4) Add the following (if not exists) at the end of the file or the start of the file:
127.0.0.1 localhost
5) Click Save, and it should work without any restart.
If you are using Linux, do the following:
1) Open the Terminal, type nano /etc/hosts
2) Add the following (if not exists):
127.0.0.1 localhost
3) Now, press Ctrl+X, and press Enter
The above should solve your problem, but if not, please let me know.
Related
I am working on mac with sierra. I have recently installed apache, php, mysql and phpadmin. I followed this instruction: https://medium.com/#JohnFoderaro/how-to-set-up-apache-in-macos-sierra-10-12-bca5a5dfffba#.jraxx6f9f to instal apache php and to configur virtual hosts and this one: https://www.youtube.com/watch?v=b_6g_5S_bVo&t=183s to instal mysql and phpadmin.
I put my website (html + php) on apache server, all data is stored in /Library/Sites/foo/, I can access it via localhost and everything works fine.
I have my phpmyadmin folder in Library/WebServer/Documents/.
After starting mysql and visiting localhost/phpmyadmin/ or localhost/phpmyadmin/setup/ or localhost/phpmyadmin/config/ I am still getting page 404 Not Found.
I have visited many website with similar cases but I can not work it out.
localhost/phpmyadmin giving page not found error,
Localhost or phpMyAdmin not found on server: How to fix?
In my case /etc/apache2/apache2.conf is empty and adding "Include /etc/phpmyadmin/apache.conf" isn't working, moreover adding it to /etc/apache2/httpd.conf gives error. I have read that it might by coused because apache server is working and it is impossible to use phpadmin and apache on the same time on the same place is it true? After stopping apache phpadmin doen't work as well.
What am I doing wrong?
Hope this will help you to get through this.
After Configuring apache you need to follow these steps to get connect with local MySQL.
Download the "Mac OS X 10.12 (x86, 64-bit), DMG Archive" - dmg version from https://dev.mysql.com/downloads/mysql/5.7.html and install the mysql in your mac machine. At end of the installation root password will be generated. kindly copy that password into notes or other files
In terminal follow these steps (PURE OPTIONAL)
"cd /usr/local/mysql/bin" click enter button
"sudo ./mysql -u root -p" click enter and terminal will ask for
password and you need to copy paste the MySQL ROOT password which i
mentioned the step 1 and enter.
now you will be into mysql and if you want to change the ROOT
password then enter this command in terminal "Alter user
'root'#'localhost' identified by 'your new password which you like
to change';" enter and exit from terminal
Download phpmyadmin from https://www.phpmyadmin.net/ and extract the phpmyadmin file and rename it as phpMyAdmininto your WebServer/Documents folder ( /Library/WebServer/Documents/)
Go to Terminal and enter the following command
cd /Library/WebServer/Documents/ and click enter
cd phpMyAdmin and click enter
sudo mkdir config and click enter
sudo chmod o+x config and click enter
Go to Browser URL and enter the following localhost/phpmyadmin/setup and server set up page will be open and follow the below steps
Click on New Server button then navigate to authentication tab
and enter the ROOT PASSWORD & click apply button
At bottom of overview page you can find Download button and click
that and config.inc.php file will be downloaded
copy paste the config.inc.php file inside your phpMyAdmin
folder
Go to your browser url then enter localhost/phpmyadmin/ and enter with your credentials into database
Ok I have solved it. It was because I didn't create a virtual host and hostname for phpmyadmin.
This is how I made it:
1.Use sudo nano /etc/apache2/extra/httpd-vhosts.conf to create virtual host for phpmyadmin I tried:
<VirtualHost *:80>
DocumentRoot "/Users/piotrek/Sites/phpmyadmin"
ServerName phpmyadmin.localhost
ErrorLog "/private/var/log/apache2/phpmyadmin-error_log"
CustomLog "/private/var/log/apache2/phpmyadmin-access_log" common
</VirtualHost>
Go to sudo nano /etc/hosts to create hostname entries. I tried:
127.0.0.1 phpmyadmin.localhost
Restart apache sudo apachectl restart
Put phpmyadmin file into Sites
Everything works fine, I can create new database and work with it :)
I just installed Wampserver. after installing it, the icon color is green and say the server is online. then I tried localhost on my browser. it showed "the site can't be reach" but when I entered http://127.0.0.1/ it works and displays Wampserver homepage. Why it did not work when I entered "localhost"? it only can enter http://127.0.0.1/ . Is there something that I must change in the settings? when I tried to change the port be port 80, it showed "CLI stop working".
localhost does not exists automatically. Its actually a domain name you have to create on your PC. You do this by adding it to your HOSTS file.
Edit the file C:\windows\system32\drivers\etc\hosts
Add these lines to it
localhost 127.0.0.1
localhost ::1
You also need the ::1 version as well as that is IPV6, and lots of browsers will attempt to use the IPV6 network in preference to the IPV4 (127.0.0.1)
You will have to be an Administrator to edit this file as it is protected by windows.
Or open your editor by right clicking on it, and selecting the "Run as Administrator" menu option.
I'm just stuck on one little thing here but here is what I've done so far using websites and video tutorials (Note: I'm Running on Windows 10 and using Microsoft Edge as a browser for WAMP).
Disabled Skype
I went into the little WAMP menu/apache/httpd.conf and changed LISTEN
to port 81.
It still said port 80 was being used by Windows IIS 10.0 so I went into the Command Prompt as admin and used "iisreset /stop". Now WAMP is green and online, yay.
I enter localhost at the top of the WAMP menu and it brings me to a webpage saying "Make sure you’ve got the right URL: http://localhost".
I have gone into (C:)/Wamp/www and changed a line of code in "index" to $suppress_localhost = false;. Nothing changed.
Now I'm in (C:)/Windows/System32/drivers/etc and editing the "hosts" file. The edit is simply uncommenting my ip address which will supposedly reveal where WAMP should be going. It will not allow me to save it unless I give myself full control which is done by right clicking the file and selecting properties. However, when I try to save the file it fails and says "Please check if this file is open in another program". This is what I am stuck on.
Does anyone know how to check what other programs are using this file or is there another method of connecting to localhost to WAMP?
Thanks in advance!
First return Apache's listening port to 80.
Doing this "iisreset /stop" will only stop IIS until the next reboot. So it is better to uninstall IIS completely if you are not using it.
This I enter localhost at the top of the WAMP menu and it brings me to a webpage saying "Make sure you’ve got the right URL is probably due to the fact that there is more than once place where you need to change the listening port in apache, so when you put it back to
Listen 0.0.0.0:80
Listen [::0]:80
This will probably go away
SKYPE: You can configure SKYPE to not use port 80 or 443, but as far as I know you cannot do this to the tiles SKYPE, so uninstall that and then install the SKYPE App (from the SKYPE website). This can be reconfigured like this :-
Start SKYPE,
Menu Tools -> Options -> Advanced -> Connection
On this dialog, Uncheck the checkbox labeled
Use port 80 and 443 for additional incoming connections
and add a number to the `use port` field, something like `33333`
SKYPE should no longer attempt to use port 80.
The HOSTS file is protected by Windows, and possibly your Anti Virus also tried to protect it. To amend the HOSTS file you have to elavate your privilages to Administrator, and before you say you are, you are not. Start a command windows using the "Run as Administrator" option.
CD into C:\windows\system32\drivers\etc
run notepad hosts
Make your changes and save them
Host file should contain at least
127.0.0.1 localhost
::1 localhost
I use XAMPP 1.7.3. Apache and MySQL installed. Nothing else.
Apache installed on default port 80. Clicking on Admin next to Apache opens http://localhost/xampp/. Which works as expected.
I navigated to xampp/apache/conf/httpd.conf and edited it. Set Listen 8080. Now http://localhost:8080/xampp/ works as expected but the Admin button still opens http://localhost/xampp/ which does not open anything. I have restarted the computer after doing so with no results.
How to make XAMPP apache admin open localhost:8080/xampp ?
The port that the Admin button references is configurable. In the XAMPP install folder there is a xampp-control.ini file. Changing the Apache entry under [ServicePorts] will affect the url the Admin button opens.
[ServicePorts]
Apache=8080
I believe the admin button will open the default configuration always. It simply contains a link to localhost/xampp and it doesn't read the server configuration.
If you change the default settings, you know what you changed and you can enter the URL directly in the browser.
you can get loccalhost page by writing localhost/xampp or by writing http://127.0.0.1 you will get the local host page. After starting the apache serve that can be from wamp, xamp or lamp.
Steps using XAMPP GUI:
Step-1: Click on Config button
Step-2: Click on Service and Port Settings button
Final step: Change your port and Save
I agree and found this file under xammp-control the type of file is configuration.
When I changed it to 8080 it worked automagically!
Open XAMPP look below the X to close the program there is a Config option click it then click service and port settings then under Apache change your main port to whatever you changed it to in the config file then click save and your good to go.
I'm getting below error when I type in localhost/phpMyAdmin after starting apache and mysql server in Xampp in Windows 7 environment.
Is there a way I can fix this issue?
Not Found
The requested URL /phpMyAdmin was not found on this server.
Use lowercase: http://localhost/phpmyadmin
Apache is case-sensitive.
404 is the code for page not found
If you get this while running both mysql and apache It means the Url is not correct:
Check the alias like in #kamil's comments
If alias is correct then you need to specify the port.
http://localhost/phpmyadmin is the url if your port is set to default 80.
In my case I already had a service listennig on that port so I had to change it.
The fix is to add the port if it is a custom one:
http://localhost:<port>/phpmyadmin
To find out which port you have look inside of httpd.conf.
here is a screenshot for xampp:
To quickly find it, search for listen:
First of all go to apache config.
Now go to select Apache “httpd.conf” so now you can see that a notepad file will be opened”.
Find the word “Listen” using ctrl + F button or go to Edit then select find.
Replace “Listen 80” to “Listen 8080“.
Again find another “Listen” now change “ServerName localhost:80” to “ServerName localhost:8080” and then save it.
“We are almost done to fix localhost/phpmyadmin”
Step 6: Again go to config and select “Apache (httpd-sss.conf)“.
Step 7 is to Find “Listen 443” and change it to “Listen 4433“
Step 8: Find “” and replace this with “” and again save it.
Step 9: Go to config and select “service & ports settings” and change the port to 8080 and 4433 and save it.
Step 10: Restart, the localhost/phpmyadmin is solved.
Thank you, also share this !
I just finished installing xampp 1.8.2 on WinXP XP2 machine and got same error show up on my Firefox 24.0 browser:
xampp Not Found The requested URL /phpmyadmin/ was not found on this
server.
I solved this problem by changing the proxy of my firefox browser, go to menu tools-Option
find tab Network, click button settings. Fill the text box below No Proxy for with localhost.
In my case then it looklike:
192.168.1.0/24, localhost
Then press Ok, then Ok again.
Try now typing localhost/xampp then it should show Welcome to XAMPP for Windows!
Note: to change proxy for other browser may differ, check your browser help about how to change proxy.
Hope this help.
Is port 80 being used by another service or app?
I think you can check by the test in:
xammp> apache>service> test>
Try to uninstall the XAMPP and check the phpmyadmin upon reinstalling
Try I did not access it directly like following url pattern :
url : localhost or localhost/file-folder-of your project name.
But i can access file or folder and phpmyadmin using
url : localhost:port_num/file-folder-of your project name