I'm trying to setup an online host to ensure that I'm able to run my .php file from Eclipse like a web site.
I do as instructed out of this discussion: Make XAMPP/Apache serve file outside of htdocs
Scroll lower to virtual hosts and also the instruction is essentially
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot "/Users/Oky/Documents/eclipse/firstEclipseProject/" ServerName firstEclipseProject.localhost ErrorLog "/Users/Oky/Documents/eclipse/firstEclipseProject/logs/error_log" <Directory /Users/Oky/Documents/eclipse/firstEclipseProject/> Order allow,deny Allow from all </Directory> CustomLog "logs/dummy-host2.example.com-access_log" common </VirtualHost>
The document reaches /Application/XAMPP/etc/extra/httpd-vhosts.conf
I Quickly alter the hosts file at /private/etc/hosts and at the end, I added
127.0.0.1 firstEclipseProject.localhost #firstEclipseProject
So, I believe I'm doing the work up to this time because after i fire my browser and indicate firsteclipseproject.localhost, it redirects me to
the primary XAMPP web site. It doesn't return an itemOrweb page not found meaning the redirecting is sort of working.
So, in /Customers/Oky/Documents/eclipse/firstEclipseProject/ I produce a php file known as HelloWorld.php however when I indicate firsteclipseproject.localhost/HelloWorld.php, it states object not found! I additionally attempted firsteclipseproject.localhost/XAMPP/HelloWorld.php also it fails.
Any assistance is appreciated! Thanks!!!
I recommend you depart the main directory the actual way it is and rather setup an Alias for your eclipse directory.
Have you restart apache after making config changes?