0

I'm trying to access website located on XAMPP server on my other computer located on the same LAN network. I am able to see welcome screen of XAMPP server, i.e., 192.168.0.1/xampp/ but when I am pointing to my website, i.e., 192.168.0.1/xampp/website/ it says:

OBJECT NOT FOUND! The requested URL was not found on this server. ERROR 404.

  • In which folder did you put your website? – Sven van den Boogaart Sep 19 '15 at 16:45
  • What OS are you using? – MrWhite Sep 19 '15 at 17:58
1

Where is your website directory on your local filesystem? My guess is that you've probably put the files in the wrong place.

When you request <host>/xampp/ (a URL) it's actually serving the files from the /xampp/htdocs directory on the local filesystem (this is the default location at least).

So, in order to successfully request <host>/xampp/website/, the website directory needs to be in the htdocs subdirectory.

However, if you plan to setup multiple websites, it would be preferable to create separate <VirtualHosts> in the server config for each website, rather than trying to create subdirectories for each site within the default website - this is really only 1 "website".

0

Did you also try accessing your local website through 127.0.0.1 ? Some *AMP stacks in their default config set-up allow access to your project folders only from the same local machine through 'localhost' or '127.0.01'

  • Although the OP does state that 192.168.0.1/xampp/ is successfully serving content. – MrWhite Sep 19 '15 at 13:21
  • True, but I had this same situation a while back with WAMP server stack and switching to "online" mode from the control panel, in the notification area, helped resolving that issue. (I too could access the welcome page but none of the project folders after a OS upgrade) – Kārlis K. Sep 19 '15 at 13:27
  • I also second the suggestion about setting up Virtual Hosts as it helps to organize your actual projects and "doodles" / ideas and experiments apart from one another. – Kārlis K. Sep 19 '15 at 13:31
  • Thanks for pointing that out, you are correct and I was not aware I could do thar - still learning my way around Stack Exchange. – Kārlis K. Sep 19 '15 at 13:42
0

There are two basic Apache installs. Years ago, Apache updated how it was intended to work, however, not all builds followed suit. For example, RedHat continued to use the older configuration methods while Ubuntu used the newer. For this reason, some quick digging must be done to figure out where your files should be installed.

I am assuming Apache 2 of any version.

First, let's determine which one you are looking at.

Please understand that the paths I use are typical (and based on memory), but may not always be the case. You may have to explore a bit

In /etc/apache2/ you may see sites-enabled/. If you do, you have the newer install/configuration.

Older install:

The older install uses httpd.conf in /etc/apache2/. You will be looking for the directive. Typically, this is /var/httpd/htdocs/. This is where you want to place your files.

Newer install:

The newer install will by default use 000-default.conf. You can know for sure if you do not see a file in the format of domainname.tld.conf. If you do not see this file, you can check 000-default.conf for the <directory> directive. This should also be /var/httpd/htdocs/. However, if you do see the file domainname.tld.conf, you will need to check this file for the <directory> directive. On some installs, this could be /home/domainname.tld/www/, however, some installs will place the sites home directory somewhere else. There are several other places where your site directory may have been created. You will need to note this path.

Typically, in cases like this one, people create their site in /var/httpd/htdocs/ and the sites-enabled/domainname.tld.conf actually points to another directory. You will need to move your files to the right directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.