0

I am trying to set up a virtual host using wamp. Instructions I followed from this tutorial.

This is how I added directory, VirtualHost code to apache `httpd-vhosts.conf file.

<Directory C:/Users/myName/projects>
    Order Deny,Allow   
    Allow from all 
</Directory>

<VirtualHost *:8000>   
    DocumentRoot "C:/Users/myName/projects/myFirst" 
    ServerName mysite.local 
</VirtualHost>

also I uncommented: Include conf/extra/httpd-vhosts.conf in httpd.conf file.

But when I trying to open my webpage using my virtual servername its not going to mypage.

NOTE: I have changed default port to 8000 to access localhost server. Localhost URL like this - http://localhost:8000/

UPDATES: From apache-error.log file:

[Mon Oct 26 17:48:12.935427 2015] [mpm_winnt:notice] [pid 5432:tid 384] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Mon Oct 26 17:48:15.196556 2015] [mpm_winnt:notice] [pid 3344:tid 308] AH00364: Child: All worker threads have exited.
[Mon Oct 26 17:48:18.216729 2015] [mpm_winnt:notice] [pid 5432:tid 384] AH00430: Parent: Child process 3344 exited successfully.
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Mon Oct 26 17:48:31.249474 2015] [mpm_winnt:notice] [pid 3556:tid 400] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations

[Mon Oct 26 17:48:31.249474 2015] [mpm_winnt:notice] [pid 3556:tid 400] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Mon Oct 26 17:48:31.249474 2015] [core:notice] [pid 3556:tid 400] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Mon Oct 26 17:48:31.252474 2015] [mpm_winnt:notice] [pid 3556:tid 400] AH00418: Parent: Created child process 3744
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [C:/Apache24/docs/dummy-host2.example.com] does not exist
[Mon Oct 26 17:48:32.228530 2015] [mpm_winnt:notice] [pid 3744:tid 324] AH00354: Child: Starting 64 worker threads.

Can anybody tell me whats wrong with this?

user3733831
  • 2,886
  • 9
  • 36
  • 68
  • How exactly is it not going? Are you `Listen`ing to the involved IP and port combinations? Do you want name based virtual hosts or not? – Álvaro González Oct 26 '15 at 12:22
  • @ÁlvaroG.Vicario, This is what I changed in `httpd.conf` - `#Listen 12.34.56.78:80 Listen 0.0.0.0:8000 Listen [::0]:8000` – user3733831 Oct 26 '15 at 12:27
  • @ÁlvaroG.Vicario, I am not sure what you have asked `name based virtual hosts or not` – user3733831 Oct 26 '15 at 12:29
  • Do you want each site to load on a different port (as question title says) or through a different name (as the linked tutorial explains)? – Álvaro González Oct 26 '15 at 12:31
  • @ÁlvaroG.Vicario, I want site to load through a different name. Mean time I updated question with some contents from my apache-error.log file. – user3733831 Oct 26 '15 at 12:34
  • Your Apache log only suggests that you are using the virtual host template that comes with the program but you haven't touched a comma in it. Now it's clear what you want to accomplish, what happens with your current set up that makes you unhappy? – Álvaro González Oct 26 '15 at 12:57
  • With my current setup I cannot open my webpage and I am sure I have placed my page within The DocumentRoot – user3733831 Oct 26 '15 at 13:04
  • As the article clearly explains it's outdated for Apache 2.4 but it doesn't have any obvious mistake if that's what you're asking. Otherwise, please share your symptoms so we can figure out what's wrong. "Does not work" is not of much help. Look at the screen. Check what you can see instead of your site. Read error messages if any. – Álvaro González Oct 26 '15 at 13:14
  • Its not display any error message there. When I trying to open the webpage entering servername on the browser address bar, It display a blank page instead of displaying my webpage... – user3733831 Oct 26 '15 at 13:22
  • @ÁlvaroG.Vicario, I also went on with this [article](http://ronangelo.com/how-to-create-a-project-or-virtual-host-with-wamp/) and with this [question](http://stackoverflow.com/questions/25196611/create-vhost-in-wamp-2-5-in-different-directory-on-win7-returns-forbidden-error). But still no luck – user3733831 Oct 26 '15 at 14:05
  • I can't think of any misconfiguration that can lead to a blank page. Blank page is a classical symptom of error in PHP application :-? – Álvaro González Oct 26 '15 at 15:04
  • There is no any php there, Here I am using very simple "hello World" html file as my index page... – user3733831 Oct 26 '15 at 15:48
  • 1
    Not the best tutorial in the world. See this post for [help creating Virtual Hosts](http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) – RiggsFolly Oct 27 '15 at 00:39
  • @RiggsFolly, Thank you for sharing a useful link.. – user3733831 Oct 27 '15 at 08:00

0 Answers0