Virtual Host Woes......

Ride your rocket anywhere you like here, but keep your Orbit Stable.

Virtual Host Woes......

Postby Aethelwulffe » Thu Oct 20, 2011 10:13 pm

Looking for some sort-of off topic help....
This isn't directly related to OpenEMR...though it does have bearing on the 4.1 package extras I am trying to get together before we pack up our 5010 stuff for windows xampp

I created working localhost stuff in system32 hosts file.
In xampp\apache\conf\ httpd.conf
Include conf/extra/httpd-vhosts.conf
is not commented out

In httpd-vhosts.conf I left all the commented out junk and tried to use the following:

Code: Select all
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/htdocs/
ServerName localhost
</VirtualHost>

<VirtualHost www.starfrontiers.org>
DocumentRoot "C:\xampp\htdocs\starfrontiers\"
ServerName starfrontiers.org
ServerAlias www.starfrontiers.org
<Directory "C:\xampp\htdocs\starfrontiers\">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost arsponline.org>
DocumentRoot "C:\xampp\htdocs\ARSP\"
ServerName arsponline.org
ServerAlias www.arsponline.org
<Directory "C:\xampp\htdocs\ARSP\">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



After changing this, I can't even get the apache server started....
I have followed many examples of how to set up virtualhosts (with and without changing windows host file) and using several different variants of syntax I have found. Nothing seems to work. I know that a good bit of configuration went into creating the xampp package for openemr, and there are a number of bits that do things like set directory permissions for OpenEMR. I did change xampp\htdocs\index.php to go to the /arsp/ directory to avoid getting the xampp page without specifically navigating there via localhost, but I really need to get my three different domains all set up on this single server. In IIS, it was easy for me, but I am missing something here....
OEMR Board Member
User avatar
Aethelwulffe
 
Posts: 318
Joined: Tue Aug 16, 2011 1:25 pm
Location: Tampa Florida
Blog: View Blog (1)

Re: Virtual Host Woes......

Postby jcahn » Sun Oct 23, 2011 11:03 am

Do you think viewing these virtual hosts with webmin would be any help? It has bailed me out before. Jack
User avatar
jcahn
 
Posts: 87
Joined: Tue Aug 16, 2011 3:51 pm
Location: Sparta NC 28675 USA

Re: Virtual Host Woes......

Postby Aethelwulffe » Sun Oct 23, 2011 6:36 pm

I don't know how I could view them since the apache server won't start. Any ideas?
OEMR Board Member
User avatar
Aethelwulffe
 
Posts: 318
Joined: Tue Aug 16, 2011 1:25 pm
Location: Tampa Florida
Blog: View Blog (1)

Re: Virtual Host Woes......

Postby jcahn » Sun Oct 23, 2011 9:50 pm

Comment out all three and if apache then starts, add back one at a time to see which one is breaking the bank.
User avatar
jcahn
 
Posts: 87
Joined: Tue Aug 16, 2011 3:51 pm
Location: Sparta NC 28675 USA

Re: Virtual Host Woes......

Postby Aethelwulffe » Mon Oct 24, 2011 4:25 pm

We have our answer...any of them...dang!

Well, I gotta get onto 5010 stuff before my peeps go into hysteria....wish I could just resolve this.
OEMR Board Member
User avatar
Aethelwulffe
 
Posts: 318
Joined: Tue Aug 16, 2011 1:25 pm
Location: Tampa Florida
Blog: View Blog (1)

Re: Virtual Host Woes......

Postby jcahn » Mon Oct 24, 2011 5:40 pm

Here's a working sample on ubuntu server so the web roots are different of course:

Code: Select all
DocumentRoot /var/www
   <Directory />
      Options FollowSymLinks
      AllowOverride None
   </Directory>
   <Directory /var/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
   </Directory>

   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
   <Directory "/usr/lib/cgi-bin">
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
   </Directory>

   ErrorLog ${APACHE_LOG_DIR}/error.log

   # Possible values include: debug, info, notice, warn, error, crit,
   # alert, emerg.
   LogLevel warn

   CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

User avatar
jcahn
 
Posts: 87
Joined: Tue Aug 16, 2011 3:51 pm
Location: Sparta NC 28675 USA

Re: Virtual Host Woes......

Postby Aethelwulffe » Fri Oct 28, 2011 11:08 pm

Hi Jack,

Been busy with other things...as you are aware.

Your example seems to set up aliases for directories. How does it handle identifying what domain is requested on port 80?
Are you using multiple domain names with different web-sites? I see no "ServerName".
OEMR Board Member
User avatar
Aethelwulffe
 
Posts: 318
Joined: Tue Aug 16, 2011 1:25 pm
Location: Tampa Florida
Blog: View Blog (1)

Re: Virtual Host Woes......

Postby Aethelwulffe » Sat Oct 29, 2011 4:03 pm

Hi Jack,

I DID get some use out of your sample. Thank you very much for helping me out.
Apparently, apache 2.2 does not like having the same thing configured twice, so you can't go putting "Listen 80" or duplicate localhost configurations in the include. Configurations that work under linux vs. windows are really not quite done the same way either.
Now that my virtualhosts work, and I even have parallel directories thinking they are under each other and all that fun stuff (needed for the default openEMR install), I am on my way with other things. I am setting up a testbed phpbb3 install here now.
OEMR Board Member
User avatar
Aethelwulffe
 
Posts: 318
Joined: Tue Aug 16, 2011 1:25 pm
Location: Tampa Florida
Blog: View Blog (1)

Re: Virtual Host Woes......

Postby jcahn » Sun Oct 30, 2011 9:36 am

Glad you got it going Art. Like so much else, it's over my head. Jack
User avatar
jcahn
 
Posts: 87
Joined: Tue Aug 16, 2011 3:51 pm
Location: Sparta NC 28675 USA


Return to Chat [Off Topic]

Who is online

Users browsing this forum: No registered users and 0 guests

cron