: Hosting a web site for local network 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'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.
More posts by @Annie201
3 Comments
Sorted by latest first Latest Oldest Best
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.
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'
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".
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.