I am using XAMPP. and internal server of Django.
When I browse to localhost
or 127.0.0.1
, It shows
Not Found . HTTP Error 404. The requested resource is not found.
It sometimes works fine and other times pops up the error.
Moreover, when I browse to my project url, ie 127.0.0.1:8000/cc
, the project url works fine.
Any ideas why is this happening?
asked Jul 23, 2013 at 7:21
PythonEnthusiastPythonEnthusiast
16.3k43 gold badges132 silver badges256 bronze badges
You need to add the port number to every address you type in your browser when you have changed the default port from port 80.
For example: localhost:8000/cc .
A little edition here is that it should be 8080 in place of 8000.
For example —
http://localhost:8080/phpmyadmin/
answered Jul 23, 2013 at 16:59
1
I had the same problem and here is how it worked for me :
1) Open XAMPP control panel.
2)On the right top corner go to config > Service and Port setting
and change the port (I did 81 from 80).
3)Open config in Apache just right(next) to Apache admin Option and click on that and select first one (httpd.conf) it will open in the notepad.
4) There you find port listen 80 and replace it with 81 in all place and save the file.
5) Now restart Apache and MYSql
6) Now type following in Browser :
http://localhost:81/phpmyadmin/
I hope this works.
answered Dec 11, 2019 at 10:57
Many frameworks like Laravel
, Django
,… run local web server that work on another port except 80.For example port 8000
is the most commen port that these local web servers use.
So when you run web servers that frameworks build them and type localhost:8000
it works well.But web server that xampp(apache)
runs it has another port.In default it has 80
that it does not need to type it in url.And if you change port you should mention it in url.
**In brief:**web server in framework is different from web server in xampp . Check the port of each server and mention it in url when you use them.
answered Feb 14, 2020 at 17:21
akbarakbar
5795 silver badges12 bronze badges
If your server is still listening on port 80, check the permission on the DocumentRoot folder and if DirectoryIndex file existed.
answered Dec 26, 2014 at 8:42
KlausKlaus
4415 silver badges8 bronze badges
Try checking your web routes most likely there is nothing pointing to the default path in your routes //default path or route Route::get('/', [ PagesController::class,'index']);
in this case
answered Mar 2, 2021 at 11:58
If you are getting a 404 Error in PHP or you are not able to see PHPMyAdmin,
it might be you have changed your default port.
For instance, I have changed from port 80 to 8081. So after changing the port, you have to just type http://localhost:8081 in your browser.
eg: localhost:yourPortName/
phpmyadmin Page — http://localhost:8081/phpmyadmin/
answered Mar 14, 2022 at 5:15
- Open XAMPP control panel.
2)On the right top corner go to config > Service and Port setting and change the port. Under the Apache tab , change main port to 8080 and SSL port to 4433 and click save.
screenshot of Service and Port
3) Change the Default Port Settings of the httpd.conf File
- Open config in Apache just right(next) to Apache admin Option and
click on that and select the first one (httpd.conf) it will open in
the notepad. - Locate 80( to get started, press Ctrl + F, then enter “80” in the
search field.) - Modify the following lines :
Port 80 to Port 8080
Listen 80 to Listen 8080
servername localhost:80 to servername localhost:8080
4) Update the Default Port Settings in the http-ssl.conf File
-
Open config in Apache just right(next) to Apache admin Option and
click on that and select the first one (http-ssl.conf) it will open
in the notepad. -
Locate 443( to get started, press Ctrl + F, then enter “443” in
the search field.) -
Modify the following sentences:
Listen 443 => Listen 4433 <VirtualHost _default_:443> => <VirtualHost _default_:4433> ServerName www.example.com:443 => ServerName www.example.com:4433
-
Now restart Apache and MYSql
-
Now type following in Browser : http://localhost:8080/phpmyadmin/
Note: you can use any other port
answered Jan 5 at 19:44
open D:xamppapacheconfextrahttpd-vhosts.conf
ServerName localhost
DocumentRoot «D:xampphtdocs»
SetEnv APPLICATION_ENV «development»
DirectoryIndex index.php
AllowOverride FileInfo
Require all granted
Restart Apache server
and then refresh your given url
answered Jul 16, 2016 at 12:31
PankajPankaj
1712 silver badges11 bronze badges
In my case, it was just a VPN problem.
I was working in my companies network (via VPN).
After switching to private network, the problem disappeared!
answered Oct 19, 2021 at 8:49
Max MarkMax Mark
712 silver badges9 bronze badges
I am using XAMPP. and internal server of Django.
When I browse to localhost
or 127.0.0.1
, It shows
Not Found . HTTP Error 404. The requested resource is not found.
It sometimes works fine and other times pops up the error.
Moreover, when I browse to my project url, ie 127.0.0.1:8000/cc
, the project url works fine.
Any ideas why is this happening?
asked Jul 23, 2013 at 7:21
PythonEnthusiastPythonEnthusiast
16.3k43 gold badges132 silver badges256 bronze badges
You need to add the port number to every address you type in your browser when you have changed the default port from port 80.
For example: localhost:8000/cc .
A little edition here is that it should be 8080 in place of 8000.
For example —
http://localhost:8080/phpmyadmin/
answered Jul 23, 2013 at 16:59
1
I had the same problem and here is how it worked for me :
1) Open XAMPP control panel.
2)On the right top corner go to config > Service and Port setting
and change the port (I did 81 from 80).
3)Open config in Apache just right(next) to Apache admin Option and click on that and select first one (httpd.conf) it will open in the notepad.
4) There you find port listen 80 and replace it with 81 in all place and save the file.
5) Now restart Apache and MYSql
6) Now type following in Browser :
http://localhost:81/phpmyadmin/
I hope this works.
answered Dec 11, 2019 at 10:57
Many frameworks like Laravel
, Django
,… run local web server that work on another port except 80.For example port 8000
is the most commen port that these local web servers use.
So when you run web servers that frameworks build them and type localhost:8000
it works well.But web server that xampp(apache)
runs it has another port.In default it has 80
that it does not need to type it in url.And if you change port you should mention it in url.
**In brief:**web server in framework is different from web server in xampp . Check the port of each server and mention it in url when you use them.
answered Feb 14, 2020 at 17:21
akbarakbar
5795 silver badges12 bronze badges
If your server is still listening on port 80, check the permission on the DocumentRoot folder and if DirectoryIndex file existed.
answered Dec 26, 2014 at 8:42
KlausKlaus
4415 silver badges8 bronze badges
Try checking your web routes most likely there is nothing pointing to the default path in your routes //default path or route Route::get('/', [ PagesController::class,'index']);
in this case
answered Mar 2, 2021 at 11:58
If you are getting a 404 Error in PHP or you are not able to see PHPMyAdmin,
it might be you have changed your default port.
For instance, I have changed from port 80 to 8081. So after changing the port, you have to just type http://localhost:8081 in your browser.
eg: localhost:yourPortName/
phpmyadmin Page — http://localhost:8081/phpmyadmin/
answered Mar 14, 2022 at 5:15
- Open XAMPP control panel.
2)On the right top corner go to config > Service and Port setting and change the port. Under the Apache tab , change main port to 8080 and SSL port to 4433 and click save.
screenshot of Service and Port
3) Change the Default Port Settings of the httpd.conf File
- Open config in Apache just right(next) to Apache admin Option and
click on that and select the first one (httpd.conf) it will open in
the notepad. - Locate 80( to get started, press Ctrl + F, then enter “80” in the
search field.) - Modify the following lines :
Port 80 to Port 8080
Listen 80 to Listen 8080
servername localhost:80 to servername localhost:8080
4) Update the Default Port Settings in the http-ssl.conf File
-
Open config in Apache just right(next) to Apache admin Option and
click on that and select the first one (http-ssl.conf) it will open
in the notepad. -
Locate 443( to get started, press Ctrl + F, then enter “443” in
the search field.) -
Modify the following sentences:
Listen 443 => Listen 4433 <VirtualHost _default_:443> => <VirtualHost _default_:4433> ServerName www.example.com:443 => ServerName www.example.com:4433
-
Now restart Apache and MYSql
-
Now type following in Browser : http://localhost:8080/phpmyadmin/
Note: you can use any other port
answered Jan 5 at 19:44
open D:xamppapacheconfextrahttpd-vhosts.conf
ServerName localhost
DocumentRoot «D:xampphtdocs»
SetEnv APPLICATION_ENV «development»
DirectoryIndex index.php
AllowOverride FileInfo
Require all granted
Restart Apache server
and then refresh your given url
answered Jul 16, 2016 at 12:31
PankajPankaj
1712 silver badges11 bronze badges
In my case, it was just a VPN problem.
I was working in my companies network (via VPN).
After switching to private network, the problem disappeared!
answered Oct 19, 2021 at 8:49
Max MarkMax Mark
712 silver badges9 bronze badges
When it comes to developing WordPress in a local environment, XAMPP is a popular and trusted tool. However, that doesn’t mean you won’t ever run into errors. One you might come across is the HTTP error 404 “The requested resource is not found.”
If you encounter this issue, there are several ways to try to resolve it. These fixes aren’t overly complicated and don’t take a lot of time to perform. With a little patience, you should be back up and running in no time. In this article, we’ll explain what the error “requested resource is not found” in XAMPP is. Then, we’ll share five tips for how to fix the problem and get you back on track.
What the XAMPP HTTP Error 404 “The Requested Resource Is Not Found” Means
A 404 error is one of many HTTP status codes that are sent from a server to a client. In general, this error indicates that the browser is requesting something that can’t be found on the server.
It can be challenging to determine the source of a 404 error, as there are several potential causes. These can include:
- The domain no longer exists.
- The requested resource has been deleted or moved to a different URL.
- The URL was mistyped into the browser.
You’ve likely run into these situations when browsing the web. However, you can encounter 404 errors when working on localhost with XAMPP as well. In this case, you may also see the message expressed as Error 404 “the object is not found.”
How to Fix the HTTP Error 404 “The Requested Resource Is Not Found” in XAMPP (5 Tips)
Now that you understand what this particular XAMPP error is, let’s explore how to fix it using the following five tips.
1. Be Sure You Typed the URL Correctly
Before you attempt any other fixes, we recommend double-checking that you haven’t mistyped or included anything unnecessary in the URL. For example, a common mistake is including “XAMPP” when it’s not needed:
Errant keystrokes are a frequent cause of this error but are also easy to fix. If you’re sure you’ve entered the correct URL and are still having problems, there are a few other solutions you can try.
2. Check Your .htaccess File
A missing .htaccess file can also cause a 404 error. Therefore, it’s important to be sure the file exists in the correct location, especially if you see the “the object is not found” version of the error.
To find the file, you can navigate to the XAMPP folder on your computer. Within this folder, there will be another one called htdocs. This folder is likely where you installed WordPress when you initially set up your website. You should find the .htaccess file there:
If you are using a macOS, the file will still be in the htdocs folder. However, you’ll find it via Applications > Xampp > xamppfiles > htdocs.
If the file doesn’t exist, you’ll need to create one. To do this, open your preferred text editor and name the file “.htaccess”. The exact code you need to paste into it may vary depending on your setup, but it should look something like this:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Save the file to the folder you created for your website. Even if you don’t discover an obvious problem with your .htaccess file, sometimes simply replacing it with a fresh one can fix the error.
3. Deactivate and Uninstall New Plugins
When you install plugins, they may make changes to your code or database that can cause this 404 error. Starting with your newer plugins, you can try deactivating or uninstalling them to see if that fixes the problem.
Plugins can be deactivated from the admin dashboard of your local site. To do so, in the menu on the left of the screen, click on Plugins > Installed Plugins. To deactivate one, click on the Deactivate link under the name of the plugin:
If you want to uninstall a plugin completely, you can do so from the same screen. First, deactivate the plugin, then click on the red Delete link that below the name of the plugin:
Even if you haven’t installed any plugins recently, this is worth trying, since updates to plugins can sometimes cause problems. You can also deactivate all of your plugins at once by renaming the plugins folder in your site’s directory.
4. Check Your Database for Changes
Even if you uninstall a problematic plugin, the changes it made to your site may continue to cause issues. If you suspect this is the case, you may want to check your local site’s database for changes.
To access the database, you can type http://localhost/phpmyadmin into your browser. Alternatively, from the XAMPP control panel, you can click on the Admin button next to MySQL to open phpMyAdmin.
Now you can click on the Databases tab at the top of the screen. Locate your website’s database in the list to view the tables it contains:
Next, you’ll want to comb through the database and look for anything that shouldn’t be there. Some plugins will add entirely new tables to your database. To remove an unnecessary table, click on the Drop link to its right:
Most plugins will make changes to the wp_options table, so you’ll want to have a look at that entry. You can also check the core WordPress tables. While plugins shouldn’t change these tables, it is possible, especially if you installed a nulled plugin.
If you’re unsure what your database or tables are supposed to look like, you may want to create a new WordPress site. Then you can compare the fresh database to yours.
5. Check Your Apache Configuration
If you’re having trouble opening a PHP file, your Apache configuration could be incorrect. More specifically, there may be a conflict with the port that Apache is trying to use.
Apache uses port 80 by default, but you may need to change it if you already have something listening on that port. To find a free port, you can click on the Netstat button in the XAMPP control panel:
If port 80 is already in use, or if you just prefer to leave it open, you can go ahead and choose a free port number. We’ll use “8080” for this example, but you can use whichever port you’d like.
Next, you’ll need to edit the httpd.conf file. You can find it in C:xamppapacheconfig if you’re using Windows:
If you’re working on macOS, you can find this file in the /etc/apache2 directory. You can locate it using the Go to Folder option in Finder.
Once you’ve found the file, go ahead and open it in your preferred text editor. There are two lines you’ll need to edit:
Listen 80
ServerName localhost:80
Change the Listen
port number to 8080
and the ServerName
to localhost:8080
. Now you can save and close the file.
At this point, you can restart the Apache server and attempt to access localhost:8080 (or whichever port you’re using) in your browser. If you’re not successful, you’ll need to edit the http-ssl.conf file. Windows users can find this file in xamppapacheconfextra.
Once again, you should be able to locate this file on a macOS by typing /etc/apache2 into Finder’s Go to Folder.
Once located, you can open the file in a text editor. There are three lines that you’ll need to update in this file:
Listen 443
<VirtualHost _default_:443>
ServerName localhost:443
Locate each of these lines in the file and change the values to “8080”. After saving the file, you can restart the Apache server again. Now you should be able to access localhost:8080 in your browser.
Summary
The “requested resource is not found” error can undoubtedly slow you down when you’re working with XAMPP. There are a few possible causes for this issue. Fortunately, the solutions for resolving it aren’t complicated.
In this post, we covered a few ways you can attempt to fix the XAMPP Error 404. You can start by ensuring that you’ve entered the URL correctly, and move on from there. With any luck, you’ll be back to work in no time.
If you enjoyed this tutorial, then you’ll love our support. All Kinsta’s hosting plans include 24/7 support from our veteran WordPress developers and engineers. Check out our plans today to learn more!
Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:
- Easy setup and management in the MyKinsta dashboard
- 24/7 expert support
- The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
- An enterprise-level Cloudflare integration for speed and security
- Global audience reach with up to 35 data centers and 275 PoPs worldwide
Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.
- Remove From My Forums
-
Question
-
User-331226797 posted
newbie here.
i am running IIS 7.5(first time ever yay) — on windows 7 HomePremium.
Why do i get a «404 error not found» when i type in localhost on the browser ? When i type in 127.0.0.1 IIS works fine, I have a simple html file in intetpub/wwwroot called indexhtml and if i type 127.0.0.1/index.html it displays what i
want, which is «IIS works». If i type localhost/index.html i get a 404 error the requested resource is not foundI’ve googled and searched and have found people with similar problems but it varies most can’t get either one to work.isn’t 127.0.0.1 and localhost the same thing ?
I have a hunch that it might need just a setting tweaked , but i don’t know enough to find it. some have suggested to visit my hosts file and un- comment #127.0.0.1 localhost which i already did but still nothingt . I had XAMP installed before and
localhost was working fine a few days ago …it’s been uninstall (no issues with itself ) i just wanted to try to learn IIS.any help is appreciated thanks.
Answers
-
User-331226797 posted
I actually just solved it(obvious) — It does have to do with bindings . I switched my bindings to all unassigned and it now works- it was config to something else . DUH!
I can now type either localhost and 127.0.0.1 and not get an http 404 error.
thanks for all your help guys.
hopefully I’ll get the hang of this thing soon ..>.>
-
Marked as answer by
Tuesday, September 28, 2021 12:00 AM
-
Marked as answer by
The 404 or Not Found error message indicates that the client was able to communicate with a given server, but the server could not find what was requested.
The web site hosting server will typically generate a «404 Not Found» web page when a user attempts to follow a broken or dead link, such as when the requested file (page) is not at that URL, which will most likely mean that your phpmyadmin is not located at or symlinked to http://localhost/phpmyadmin.
I have previously come across this situation personally and my solution was actually very simple;
Copy/move phpmyadmin into /var/www or wherever you store your web files:
cp -R '/usr/share/phpmyadmin' '/var/www/'
Then create a new VirtualHost in your apache.conf file, or as I do have a .conf for each VirtualHost.
Bare in mind you will have to make sure there are no conflicting VirtualHost’s, a simple straight forward VirtualHost phpmyadmin.conf file;
<VirtualHost *:80>
ServerName phpmyadmin.local
ServerAdmin admin@your-email.com
DocumentRoot /var/www/phpmyadmin
<Directory var/www/phpmyadmin>
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Don’t forget to do;
sudo service apache2 restart
You can then go one step further in your organization regarding your setup, you may notice that my ServerName is phpmyadmin.local, this the most simple thing to do and its known as local subdomains.
To implement this you will need to do the following (of course choose your favorite text editor);
sudo gedit /etc/hosts
And here is my hosts file, full to the brim of local subdomains;
127.0.0.1 localhost
127.0.1.1 jack-mint
127.0.0.1 filmod.tk.local
127.0.0.1 filmod.uk.to.local
127.0.0.1 facebook-phishing.local
127.0.0.1 phishing
127.0.0.1 new.uksss.home
127.0.0.1 theystolemybaby.uk.local
127.0.0.1 theystolemybaby.uk.to
127.0.0.1 theystolemybaby.uk
127.0.0.1 theystolemybaby.uk.undo.it.local
127.0.0.1 theystolemymail.local
127.0.0.1 phpmyadmin.local
127.0.0.1 owa.local
127.0.0.1 itools.uk.to.local
127.0.0.1 facebook-phishing.local
127.0.0.1 lite.ml.local
127.0.0.1 rsync.local
127.0.0.1 babysnatchers.local
127.0.0.1 soon.local
10.0.0.5 sams.eth.local <- this is another machine on my network
10.0.0.6 kali.wlan.local <- as is this
127.0.0.1 hiawatha.monitor.local
127.0.0.1 hiawatha.local
127.0.0.1 w3schools.local
127.0.0.1 banshee.local
127.0.0.1 italk.local
127.0.0.1 wp-filmod.local
127.0.0.1 wordpress.local
127.0.0.1 wordpress4.3.local
127.0.0.1 films.local
127.0.0.1 movie-db
127.0.0.1 example-code.local
127.0.0.1 pythonscraping.local
# temp
#10.42.0.1 italk.local <- this is also another machine on my network
192.168.43.93 wp-filmod.local <- as is this
You can literally use nearly anything you want but I guess its good practice to use ‘subdomain.domain’.
You can use IP addresses from your entire network, essentially what you put in the hosts file an IP address that when typed in your local browser your system will first look at your hosts file and if that URL isnt in there you will be forwarded to an external DNS. Basically this a local DNS service that works like a charm.
And then in my browser I use the URL http://phpmyadmin.local or just phpmyadmin.local
- Печать
Страницы: [1] 2 3 Все Вниз
Тема: 404 ошибка [Apache2/localhost] (Прочитано 6133 раз)
0 Пользователей и 1 Гость просматривают эту тему.

miha14082
Здравствуйте! У меня проблема: у меня есть программа которая берёт файлы с сайта. И они вместе находятся на одной VDS.
Вот ошибка:
root@tc:~# wget http://localhost/lk/upload/skins/miha14082.png
—2016-08-23 11:11:02— http://localhost/lk/upload/skins/miha14082.png
Resolving localhost (localhost)… ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2016-08-23 11:11:02 ERROR 404: Not Found.

unimix
Ошибка 404 = запрашиваемый ресурс не найден.

miha14082
Ну вот в этом и проблема. Что на сайте есть файл по этому пути. А если быть точнее — на обоих доменах (домен и поддомен)

unimix
Возможно, для решения проблемы надо настроить Apache.

miha14082
Можешь помочь? Ну апач настроен вроде (ISPmanager стоит)

unimix
То, что веб-сервер выдаёт ошибку 404 не является ошибкой работы сервера. То, что wget сообщает об этом, также не является проблемой. То, что «на обоих доменах (домен и поддомен) есть файл по этому пути» ни о чём не говорит.
Что работает не так и как надо? Почему запрос делается без использования доменного имени (где доступ к файлу есть)?

miha14082
Если по домену — работает всё. А если через localhost — нет.

AnrDaemon
Спасибо, мы это поняли.
Расскажите, в чём ПРОБЛЕМА?
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.
Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

miha14082
Моё ПО получает ошибку 404

AnrDaemon
Что, в принципе, предсказуемо.
Ибо на сайте localhost этих документов нет и быть не должно.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.
Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

𝓝𝓲𝓻𝓭
Ибо domen.com (условно) и localhost это далеко не одно и то же даже если крутятся на одной машине. Чтоб ресурсы domen.com были доступны по localhost нужно в апаче прописать виртуальный хост по умолчанию ту да же куда прописан domen.com но лучше этого не делать. Что мешает брать файлы по domen.com?
Больше всего глупостей в течение дня совершает человек, который рано встаёт и поздно ложится.

miha14082
А как сделать чтобы на локалхост отдавал то же что на основной домен?

AnrDaemon
Ты невнимательно читал, что тебе пишут люди?
НЕ НАДО так делать.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.
Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

miha14082

virusoft
А как сделать чтобы на локалхост отдавал то же что на основной домен?
Прописать в апаче домен и локалхост в одно и то же место. Виртуальный хост на то и предназначен, чтобы разграничивать достап к имеющейся информации. Не даром на одном серваке (компьютере) может быть несколько сайтов и они никак не пересекаются. Ибо каждый сайт (хост, домен) лежит в своем месте. Пропиши в апаче путь до локалхоста такой же как к домену.
Если работает — не трогай. Linux — гибкая система, но один раз прогнувшись может обратным ходом распрямиться и ударить по самому (…) месту. Думай о будущем и все будет хорошо.
- Печать
Страницы: [1] 2 3 Все Вверх
Oh my god, there are so many errors, its definately incredible.
First of all: no, it is NOT the right forum or do you think «Grundlagen und Wissenswertes» sounds English? You posted into the german board.
Now all the errors:
a) did you read this comment in hosts file:
- Code: Select all
# localhost is used to configure the loopback interface
So if you want to define a new host, which should also work from another PC than only the Xampp server, DO NOT USE localhost! localhost is a reserved special name for the loopback device (= the same local PC). Replace localhost in all occurences by another name (you are free to choose any name, but NOT localhost).
b) it looks, as if mixed up what you did on the Xampp PC and/or on the other PC. This line:
- Code: Select all
127.0.0.1 localhost.
*should* be on the Xampp server (but you described it vice verse).
and this line
- Code: Select all
192.168.1.191 localhost
*should* be on the client PC. Where 192.168.1.191 is the LAN IP from the Xampp Server. Anyway, DO NOT USE localhost (dont forget that!).
c) At next, in the first line you have have dot «.» accidently at the end, this is an error:
- Code: Select all
127.0.0.1 localhost.
it *should* be without dot:
- Code: Select all
127.0.0.1 localhost
and again: DO NOT USE localhost here.
d) The DocumentRoot of your VirtualHost declaration already contains the wordpress folder:
- Code: Select all
DocumentRoot "/opt/lampp/htdocs/wordpress"
You may do so, but if you do so, you MUST NOT provide this foldername again in the URL like you did: you entered
http://localhost/wordpress/test.html
, but this of course does not work, as it finally yields to /opt/lampp/htdocs/wordpress/wordpress/test.html (twice the wordpress folder!). Therefore, either leave out the wordpress folder in the DocumentRoot declaration, OR leave it out in the URL. You MUST NOT provide it twice.
e) Last not least, you should have done all these configurations BEFORE(!) you install wordpress and while installing wordpress, you *should* use the (new) hostname instead of «localhost» during the installation. You will now have the problem, if you call wordpress from another PC via the new hostname (lets call it «xamppserver»), you have to enter either
http://xamppserver
or
http://xamppserver/wordpress
(depends on how you declare the DocumentRoot). But as you already installed wordpress on «localhost», some links will point to localhost (especially CSS stylesheets and pictures), but these cannot be resolved correctly, as localhost always points to the local PC (and not the Xampp PC). Thats the reason, why you should not use localhost. You now have to edit wp-config.php and find out, if there are any URLs inside wp-config.php, that contains «localhost», and then replace «localhost» by the new hostname «xamppserver». If you are following these advices correctly, you may succeed and everything should work fine.
-
ukinari
- Сообщения: 5
- Зарегистрирован: 16 апр 2013, 17:59
-
Максим
- Сообщения: 5993
- Зарегистрирован: 11 дек 2010, 20:29
Непрочитанное сообщение
Максим » 16 апр 2013, 18:19
Не понимаю с какой проблемой вы пришли, проблемы ведь никакой нет. У вас всё открывается, сервер показывает пустой каталог. Положите какой-либо файл в папку с доменом и тогда он будет открываться в браузере или сможете его выбрать из списка (если файл не индексный).
-
Denis_Pirojkov
- Сообщения: 39
- Зарегистрирован: 17 фев 2012, 14:21
- Откуда: Krasnodar
- Контактная информация:
Непрочитанное сообщение
Denis_Pirojkov » 16 апр 2013, 19:16
Абсолютно ничего сломанного нет.
Возможно вы удалили случайно в папке localhost файлы и поэтому нет «Вау он работает».
А так всё пашет норм.
-
ukinari
- Сообщения: 5
- Зарегистрирован: 16 апр 2013, 17:59
Непрочитанное сообщение
ukinari » 16 апр 2013, 20:51
Да там полно файлов в папке localhost, ни фига не видит.
Если пишу http://localhost/Имя_сайта
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
04/16/13 20:46:53
Apache
Сайты в папке localhost есть 100%
Все остальное работает. Но спс за ответы еще попробую.
-
Максим
- Сообщения: 5993
- Зарегистрирован: 11 дек 2010, 20:29
Непрочитанное сообщение
Максим » 16 апр 2013, 21:16
localhost это и есть сайт, вы что-то путаете, и никто так домены не открывает http://localhost/Имя_сайта . А если у вас там куча всего есть, но ничего не видно, значит согласно работы функции автосканирования в качестве корневой была подключена какая-то пустая папка из перечисленных в настройках Open Server.
-
ukinari
- Сообщения: 5
- Зарегистрирован: 16 апр 2013, 17:59
Непрочитанное сообщение
ukinari » 16 апр 2013, 23:17
Да у меня куча сайтов в папке localhost Я сколько у меня open server стоял все время http://localhost/Имя_сайта открывал. Я особо и не интересовался работает и ладно. Но теперь видно надо почитать, потому что привык. А есть какое то руководство почитать, хотя в принципе и сам найду.
-
zaur111
- Сообщения: 19
- Зарегистрирован: 02 июл 2012, 16:50
Непрочитанное сообщение
zaur111 » 18 апр 2013, 14:47
Скажите вы решили проблему, ато у мня похожая ситуация? Один сайт не хочет открываться ни в какую. Сервер видит только несколько папкок. Остальная сайты (а у меня их куча) прекрасно работают. Такое ощущение, что сервер блокирует какие то папки и файлы.
-
ukinari
- Сообщения: 5
- Зарегистрирован: 16 апр 2013, 17:59
Непрочитанное сообщение
ukinari » 26 апр 2013, 18:27
Короче не знаю что за фигня (лень разбираться), но теперь открываю http://Имя_сайта2 все свои сайты. Так работает.
-
ukinari
- Сообщения: 5
- Зарегистрирован: 16 апр 2013, 17:59
Непрочитанное сообщение
ukinari » 26 апр 2013, 20:43
Ай я слепой совсем стал мне ж сразу написали решение «А если у вас там куча всего есть, но ничего не видно, значит согласно работы функции автосканирования в качестве корневой была подключена какая-то пустая папка из перечисленных в настройках Open Server». Заметил только что, когда сообщения перечитал. Действительно ничего не открывало потому что у меня в папке localhost пустая папка www была. А я с дуру denver установил работал с ним. Теперь все работает.