Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: VHosts pointing to localhost |
|
Author |
|
bazianm
Joined: 01 Jul 2014 Posts: 11 Location: Passaic, NJ
|
Posted: Mon 24 May '21 16:46 Post subject: VHosts pointing to localhost |
|
|
I installed MySQL, Apache and PHP manually. (I am aware of XAMPP and others, I wanted to do this myself). It is on a new Windows 10 machine and is for development purposes.
Everything works EXCEPT I can't get vHosts to point right. I modified httpd-vhosts.conf as follows:
Code: | <VirtualHost *:80>
ServerAdmin mbazian@passaicschools.org
DocumentRoot "C:/Apache24/htdocs"
ServerName localhost
# ServerAlias www.dummy-host.example.com
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin mbazian@passaicschools.org
DocumentRoot "C:/projects/WebWork/mainttime.local"
ServerName mainttime.local
ServerAlias www.mainttime.local
ErrorLog "logs/mainttime.local-error.log"
CustomLog "logs/mainttime.local-access.log" common
</VirtualHost>
|
I made NO OTHER changes except to add
to my windows hosts file. I restarted the Apache service too. When I go to http://mainttime.local, it gives me the "It works!" page and not the app's main page.
What did I miss?? |
|
Back to top |
|
bazianm
Joined: 01 Jul 2014 Posts: 11 Location: Passaic, NJ
|
Posted: Mon 24 May '21 17:17 Post subject: |
|
|
OK. I made progress. I went into httpd.conf and I found this line commented out:
Code: | # Include conf/extra/httpd-vhosts.conf |
I umcommented it, restarted the service, and now I am getting a 403 error. I think I know what this is so I will post if I get that fixed as well. |
|
Back to top |
|
bazianm
Joined: 01 Jul 2014 Posts: 11 Location: Passaic, NJ
|
Posted: Mon 24 May '21 17:24 Post subject: |
|
|
Got the 403 error done too. I added a directory section to the virtual host definition with
Require all granted
and that took care of it.
Thank you all who read this thread. I hope this helps someone... |
|
Back to top |
|
|
|
|
|
|