I have been getting this error message on my Windows 10 machine:
"Not Found
The requested URL /phpMyAdmin was not found on this server."
Apparently,
I finally had enough of my Wampserver. Uninstalled it. And installed Apache, PHP, and MySQL as separate components.
Everything worked fine(phpMyAdmin incuded), Until I created virtual hosts on one of my other drives. I used the usual route, by uncommenting the httpd-vhosts.conf include in the Apache httpd.conf file- Then, added my virtual hosts to the httpd-vhosts.conf file.
I also included this block of code, along with the other virtual hosts:
DocumentRoot "C:\Apache\htdocs"
ServerName localhost
The phpMyAdmin folder is in the htdocs folder. However, my websites are on another drive. They are working fine, though. Its just the phpMyAdmin pagr that is not working.
However, almost every response seems to base itself on some 'stack' bundle, such as Wamp, or Xammp. I am not using any of these anymore.
Related
I'm trying to learn Laravel, but ran into an issue I hope you can help resolve. Recently, while working to learn php programming I installed XAMPP, without problem and used it with both php and MYSql. It uses the localhost IP of http://127.0.0.1. In the new course I'm using to learn Laravel after the installation of Laravel the setup uses http://127.0.0.1:8000/, which I can access using Visual Code Terminal and entering "php artisan serve". Following the course instructions for setting up Visual Code I next installed an Extension titled "Connect to Server". After installation of the extension I get a dialog box to connect to the database and it defaults to the 127.0.0.1:8000/ address. If I click on the connect button I get an error. That said, if I start XAMPP and change the value in the dialog box and use the XAMPP 127.0.0.1 address I make a successful connection to MYSQL.The question I have is this, am I going to have a problem in the near future as the result of the two different 127.0.0... addresses and if so is there any way to resolve it?
If you look at the problem I have outlined the issue and hope I can get some resolution before I get to the point I run into trouble.
You can use php artisan serve if you wish to use the laravel's serve command. If you wish to use xampp/wamp, you can add a virtual host in your httpd-vhosts.conf file.
In case of wamp, httpd-vhosts.conf file is in C:\wamp64\bin\apache\apache2.4.51\conf\extra where 2.4.51 is the apache version if you did not change the installation path.
In case of xampp, it is C:\xampp\apache\conf\extra
As for the vhost setup, add the snippet below (change depending on your project path):
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host.example.com
DocumentRoot "path-to-project\public"
ServerName project.local
<Directory "path-to-project">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/project-errors.log"
CustomLog "logs/project-access.log" common
</VirtualHost>
Next is open your notepad as administrator then go to C:\Windows\System32\drivers\etc then open hosts file. add 127.0.0.1 project.local
restart wamp/xampp. You should be able to access your project using project.local
Xampp comes with Apcahe/ Mysql so when you run xampp it runs apache and mysql both.
but php artisan serve starts only a php server so your database related thins will not work if you are not running mysql separately (With xampp or as a standalone installation)
You can find more about what the artisan serve command to here PHP artisan serve code
I am having a severe issues setting up a local dev environment on my mac for a wordpress site i am working on. Below is the process i have tried:
Start apache locally
Set up dev environment in httpd.conf files
Set up dev name.
Set up dev name to link to location of files
Set up dev IP.
This process worked fore every other instance except this one.
The wp-admin works fine and all posts and updates can be made there. The index.php works fine. However, this is it. No posts are working and they all come back with the same error message: 'The requested URL // was not found on this server’.
*It should be mentioned that I had xampp installed on my machine and it was running out of the same port as my local apache and sql. I changed the ports on xampp and this did not work. I uninstalled xampp, restarted my computer and this did not work.
I have several other virtual environments up and they work just fine – though they are not .php and sql based. I have been looking into this issue for about a day now and cannot figure it out.
OS X by default disables .htaccess overriding in order to enable it follow these steps:
Open this file:
/etc/httpd/users/yourusername.conf
Save with:
<Directory "/Users/yourusername/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Then restart apache with this command:
sudo apachectl restart
I'm trying to create a copy of an existing Magento website on my localhost for developing purposes.
I followed all the steps listed here: Copy ec2 files to local
I also created a fake domain for my localhost so that there’s a “.” in it as I read somewhere this is required by magento. So now my localhost fake URL is something like: www.mysite.local
I have XAMPP installed on OS X 10.9.1 and I placed the magento filesystem as follows:
/Applications/XAMPP/xamppfiles/htdocs/magento/
In the database I added the local URL as follows:
update core_config_data
set value = ‘http://www.mysite.local/’
where config_id = 6;
and on local.xml I entered the following parameters:
<host><![CDATA[localhost]]></host>
<username><![CDATA[myusername]]></username>
<password><![CDATA[mypassword]]></password>
<dbname><![CDATA[mydatabase]]></dbname>
where localhost is just localhost, myusername is the username for the db I restored on my local XAMPP server, mypassword is the password for that same db, mydatabase is the name of the same db.
Still, when I browse to www.mysite.local/magento/ or www.mysite.local I don’t see anything appear.
What am I doing wrong?
Thank you so much!
If you're using a local server, here's some basic trouble shooting to help you debug:
Firstly, is the local server active? Can you visit http://localhost without it displaying server not found? If you can't, your local server is most not running. Try firing up xampp and launching Apache.
Secondly, it seems you're trying to create a virtual host for your local server. That's great! Virtual hosts allow you to create individual URLs for projects on the same server. E.g. http://myproject.dev.
However, you first need to make sure that the server understands what you're doing.
You will need to create a virtual host in your server if you haven't already.
I see you're using xampp. What you need to do is navigate to your xampp install, and edit your apache/conf/extra/httpd-vhosts.conf file, which is the file xampp recommends you use solely for virtual hosts.
Reading: Setting Up Virtual Hosts for XAMPP
For example, in Apache, a hosts config file may look like this:
# Base
<VirtualHost *:80>
DocumentRoot "X:/"
ServerName localhost
</VirtualHost>
# Project - Some Project of Mine
<VirtualHost *:80>
DocumentRoot "X:/projects/myproject/public"
ServerName myproject.dev
ErrorLog X:/projects/myproject/logs/apache.error.log
CustomLog X:/projects/myproject/logs/apache.access.log common
php_value error_log X:/projects/myproject/logs/php.error.log
</VirtualHost>
(navigating to myproject.dev displays the files in my X:/projects/myproject/public directory)
This answer is not to explain virtual hosts to you however. There are plenty of amazing resources online to help you get started with setting up your own.
Don't forget to restart your server when you add a virtual host!
If this is already set up, is your computer's hosts file set up to point to your server?
Your hosts file on your computer is used to tell it to do certain actions when you enter a matching url in your browser.
Reading: The Hosts File and what it can do for you
Reading: How to Edit Your Hosts File
For example, using the apache conf file settings above, my hosts file must also include:
# My project - Localhost
127.0.0.1 myproject.dev
It tells my computer to send the request to my local server (at localhost) when I use the URL myproject.dev. The local server then picks up the request, sees that you're accessing myproject.dev and checks if it has any virtual hosts matching that name. Well, whaddya know, it does! It then looks at the DocumentRoot setting for the location of the server files, and continues the process. Think of your hosts file as a local DNS of sorts.
If you've just added the site to your hosts file, it may take a few minutes to start resolving correctly. Wait a little, clear your browser cache and try again.
Finally, if these steps are done, and you're receiving nothing, it may be a server configuration problem, or a .htaccess issue.
If you're running on windows, you can check your event log for apache server errors. If you have set up logging on the virtual host, you can check those files to see if it's picking up your requests, and what it's doing with them if it is.
Most issues after that point will at least yield a visible error in your browser (or a blank page).
I hope this helps!
Also checking the magento error logs could tell you what the issue is, assuming it's actually hitting magento at all at this point.
As Sean mentioned above, one of the most common problems I've seen when copying a magento site is accidentally omitting the .htaccess file - make sure it's present in your site root.
If you tested your site before making the change to core_config_data, then you can also try deleting everything in var/cache and var/session. Also make sure that the web user has write permissions on var.
Regards
Hans
Ok, let me try to shorten things so less to read.
wamp works fine for the past few months, then I started to learn laravel4 and optionally requires vhost and rewrite_module which works pretty well that when I type in larave.intro as URL it works.
Now I'm trying to use wamp again just going to localhost AND page says
The title of the page does say 404 Not Found.
Read a few threads, some said go apache->service->Test port 80 and see if there are other ports running port 80. It says
Your port 80 is actually used by : Server: Apache/2.4.4 (Win32) PHP/5.4.16
which means my apache is the only one running it isn't it...
this already makes me curious and feeling weird, well alright then I go change my port or 8000 in the httpd.conf restart my wamp. and uses localhost:8000 alright now wamp works and I test port 80 again it says
Your port 80 is actually not used.
So nothing is running on my port 80 why can't wamp use it?
And, at first I thought it's my vhost so I deleted the vhost and in my host I deleted 127.0.0.1 laravel.intro too and runs my wamp back to port 80...still doesn't work.
I was thinking then fine I will just use port 8000 BUT then my vhost won't work :(
I was using this as my vhost before
<VirtualHost *:80>
DocumentRoot "J:\wamp\www\laravel4-basic\public"
<Directory "J:\wamp\www\laravel4-basic\public">
Options FollowSymLinks Indexes MultiViews
AllowOverride All
</Directory>
ServerName laravel.intro
</VirtualHost>
and in host it's 127.0.0.1 laravel.intro
now since I'm using port 8000 I suppose I should change the vhost too? so I changed to
<VirtualHost *:8000>
and laravel.intro doesn't work. laravel.intro works if I'm using port 80 with virtualhost: *80 and in URL if I type 127.0.0.1:8000 what popped up is laravel.intro instead of the wamp index and if I use localhost:8000 wamp index comes out.
I'm pretty much so confused now.
Side note:php Admin works fine if I'm using port 80 and in URL I just go localhost/phpmyadmin
Anyone knows what I'm talking about here? I'm getting confused a bit myself at the end and anyone can get me back to port 80 with everything works?
(if I have to change port then oh wells better than one works and the other one doesn't)
Please give me some suggestions thanks ~!
completely remove the wamp files and just clean the temp files and www folder where you have installed and restart the system and then reinstall WAMP and run
The error message means apache is running, so this is a good thing.
By specifying the local host url you are requesting a file called index.htm, index.html or index.php (any one of them depending on your configuration), and the error is merely telling you that the file is not there.
Check that one of these files are in the directory : J:\wamp\www\laravel4-basic\public
If you do that and the problem persists, look for the *error_log in the WAMP log directory. The 404 error message means a file is missing. The error log will tell you which file it is looking for that is missing.
I'm using Laravel 4.1 installed in a Windows OS System with WAMP Server and I get it working using the following routine:
To avoid the conflict between localhost and your virtualhost project you can config as follow:
In the httpd.conf remove the # from the following line:
#Include conf/extra/httpd-vhosts.conf
to
Include conf/extra/httpd-vhosts.conf
Later you need to modify your httpd-vhosts.conf file from c:/wamp/bin/apacheX.X.X/conf/extra folder (i'm using Windows 8 OS). Here you need to add the following VirtualHosts:
#Localhost
<VirtualHost localhost:80>
ServerName localhost
DocumentRoot "c:/wamp/www/"
</VirtualHost>
#My VirtualHost
<VirtualHost appdomain.dev:80>
ServerName appdomain.dev
DocumentRoot "c:/wamp/www/app/public"
</VirtualHost>
In this virtualhost app is the project folder and appdomain.dev is the host that I specify in the hosts windows file located in c:/windows/system32/drivers/etc/hosts:
127.0.0.1 appdomain.dev
As you can see it needs two VirtualHosts because if you use only the second VirtualHost you overwrite the localhost access, then you need to specify the Localhost access as a new top virtualhost.
I hope it serves you.
This problem happen cause of port 8000 has been reserved so try to change it by the following :
In your command line prompt try :
php artisan serve --port=8080
Go to your browser with : localhost:8080
by that it works with me.
I have a website that works fine when deployed on a remote development server. However, when I move it to my local machine, all the images paths' are now not pointed to the right directory.
Where as <img src="/images/breadicon.png" /> used to work, I now get a 404 file not found.
When I update that to <img src="./images/breadicon.png" />, the image is found, but I don't want to have to revert back all my links when I re-deploy this site - and of course I don't want to have to work from the remote server.
The issue is, without the ., the path is perceived as http://localhost/images/breadicon.png instead of http://localhost/sitename/images/breadicon.php
What can I do to resolve all the links and have my links without ruining the code for redeployment?
Your best option is probably to set up a web host on your local machine.
For example, if your live/remote site was http://www.example.com/, you could set up a local web host as http://example/.
I'm assuming you're on Windows and using Apache. You'd need to edit your hosts file (using notepad, running as administrator, usually found here: C:\Windows\System32\drivers\etc) to contain:
127.0.0.1 example
Then create an Apache host config file, for example:
<VirtualHost *:80>
ServerName example
DocumentRoot C:/Path/To/Site/example
</VirtualHost>
Then restart Apache and go to http://example/. Assuming you follow a standard convention for links etc, this should do the trick.
Configure your webserver such that the site can be accessed under http://localhost/ instead of http://localhost/sitename.
If that name is already used for a different purpose, create a virtual host named e.g. sitename in the webserver and edit your hosts file so that sitename points to 127.0.0.1.