DeveloperSide.NET Forums
August 20, 2019, 12:12:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: This is how to set up Virtual Hosts [VitrualHosting] under Apache...  (Read 68447 times)
0 Members and 2 Guests are viewing this topic.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #15 on: November 12, 2007, 12:53:30 PM »

From a copy/paste... No.

There is no more webroot in Suite 2.0. Everything is Virtual Host centric... \www\vhosts\xxx

Create your sites under \www\vhosts\xxx, update \www\Apache22\conf\extra\httpd-vhosts.conf with the new vhost blocks.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Jonpopnycorn
Guest
« Reply #16 on: November 25, 2007, 06:18:37 AM »

I can visit http://subdomain.mymainurl.com/ but I can't visit http://www.subdomain.mymainurl.com/

On the main domain it works perfect
http://mymainurl.com/ & http://www.mymainurl.com/ - works
http://subdomain.mymainurl.com/ - works
http://www.subdomain.mymainurl.com/ - don't work - Error: "Server not found"


My domain name is from godaddy.com

Code:
<VirtualHost *:80>
ServerName mymainurl.com
ServerAlias www.mymainurl.com
DocumentRoot /www/vhosts/www.mymainurl.com
ErrorLog /www/Apache22/logs/error.log

<Directory "/www/vhosts/www.mymainurl.com">
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName subdomain.mymainurl.com
ServerAlias www.subdomain.mymainurl.com
DocumentRoot /www/vhosts/subdomain.mymainurl.com
ErrorLog /www/Apache22/logs/error.log

<Directory "/www/vhosts/subdomain.mymainurl.com">
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
</VirtualHost>

Thanks, Jonpopnycorn
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #17 on: November 25, 2007, 03:08:37 PM »

Sounds like you might not have created the DNS/HOST entry for 'www.sub...' with your registrar/godaddy. Or that it's pointing to the wrong IP or name server.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Jonpopnycorn
Guest
« Reply #18 on: November 26, 2007, 03:22:58 AM »

Oh ok, I didn't know we had to add an extra CNAME for it. Thanks for telling :)
Logged
inmrc
Member
*
Posts: 3


View Profile Email
« Reply #19 on: March 16, 2008, 03:53:13 PM »

This has to be the best wamp setup ever.
Now the only problem I have is how to add another Drupal site

It seems to be treated differently that other Vhosts. and needs to use the .htaccess file for mod rewrite.

This is the output from
C:\Documents and Settings\inmrc>httpd -S
Warning: DocumentRoot [C:/www/vhosts/omwb.com] does not exist
Warning: DocumentRoot [C:/www/vhosts/host2.tld] does not exist
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server localhost (C:/www/Apache22/conf/extra/httpd-vhosts.conf:32)
         port 80 namevhost localhost (C:/www/Apache22/conf/extra/httpd-vhosts.conf:32)
         port 80 namevhost host1.tld (C:/www/Apache22/conf/extra/httpd-vhosts.conf:48)
         port 80 namevhost host2.tld (C:/www/Apache22/conf/extra/httpd-vhosts.conf:64)
Syntax OK

The drupal doesn't show in the Vhost.config yet works perfectly including the clean URL's

May be you can explain or point me to the info on the use of suite-drupal.conf

Thanks for a great app
Ron
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #20 on: March 17, 2008, 07:18:16 PM »

Its much easier to do in the upcoming version, but for now the simplest way is to create your newdomain dir under \www\vhosts\, create the vhost block under httpd-vhosts.conf, and just place another copy of drupal under \www\vhosts\newdomain\.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
inmrc
Member
*
Posts: 3


View Profile Email
« Reply #21 on: March 19, 2008, 01:47:50 PM »

this is the VH File
www.vhosts\the-villages-online.com
<VirtualHost *:80>
   ServerName  the-villages-online.com
   ServerAlias www.the-villages-online.com
   DocumentRoot /www/vhosts/the-villages-online.com
   ErrorLog /www/Apache22/logs/error.log

   <Directory "/www/vhosts/the-villages-online.com">
      Options All
      AllowOverride All
      order allow,deny
      allow from all
   </Directory>
</VirtualHost>

I tried putting if in www/vhost/webapps and www/vhost

error message Not found on this server

httpd -S finds
www.vhosts\the-villages-online.com
         port 80 namevhost the-villages-online.com (C:/www/Apache22/conf/extra/h
ttpd-vhosts.conf:80)
Syntax OK

Where is the VH file for the Drupal?

Thanks
Ron
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #22 on: March 19, 2008, 10:24:39 PM »

Did you add this domain to the Windows HOSTS file?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
inmrc
Member
*
Posts: 3


View Profile Email
« Reply #23 on: March 20, 2008, 12:55:09 AM »

I did and then when I went to access the real site it had a conflict. I try to use the same name a the production site so the path's don't get messed up. I will try it with out the ".com"

So how does the first drupal site get resolved, I culd not find a VH file for it?

Thanks
Ron

Logged
garek007
Member
*
Posts: 2


View Profile Email
« Reply #24 on: March 20, 2008, 11:12:32 PM »

I've tried everything and I can't get other virtual hosts setup.  I've done exactly what was noted above, yet still nothing.  What could i be doing wrong? here is the code in httpd-vhosts.conf

<VirtualHost *:80>
   ServerName  dahlingroup
   
   DocumentRoot /www/vhosts/host1.tld/
   ErrorLog /www/Apache22/logs/error.log

        <Directory "/www/vhosts/host1.tld/">
                Options All
                AllowOverride All
                order allow,deny
                allow from all

      AddType text/html .php .phps .html
      AddHandler application/x-httpd-php .php
      AddHandler application/x-httpd-php-source .phps

        </Directory>
</VirtualHost>

and I added this line

127.0.0.1   dahlingroup

in the hosts file as well.  Do I need to restart or something?
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #25 on: March 21, 2008, 03:57:22 AM »

You need to restart Apache after configuration changes. And if you are using IE, you need to restart it and reload the page after hosts file changes. What does error.log show?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
garek007
Member
*
Posts: 2


View Profile Email
« Reply #26 on: March 21, 2008, 03:32:29 PM »

Okay I did what you said and this came up after I reloaded the page

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


--------------------------------------------------------------------------------

Apache/2.2.6 (Win32) mod_ssl/2.2.6 OpenSSL/0.9.8g PHP/5.2.5 Server at dahlingroup Port 80
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!