Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > Suggestions > Topic : Apache Virtual Host Configuration - too complex - suggestion



Threaded Mode | Print  

 Apache Virtual Host Configuration - too complex - suggestion (5 Replies, Read 134467 times)
keithy
Group: Member
Post Group: Newbie
Posts: 3
Status:
Quote
UseCanonicalName Off

VirtualDocumentRoot {$path}/www/%0

DirectoryIndex start.xhtml index.html

<Directory "{$path}/www/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


Whenever I have set up multiple websites on a single server this is (approximately) ALL of the config that I have ever needed. I am trying to adopt this in AMPPS, but I am not fully understanding the apparently over complicated setup that AMPS uses.

Virtualhost names are placed into /etc/hosts as 127.0.0.1 www.myserver.com for local development or left to dns for using in a deployed scenario.

Each host has a directory under {$path}/www/, e.g. www/www.myserver.com/... which under my scheme would work, but does not appear to work at all with the original AMPPS set up out of the box.

Can you help me understand why AMPPS doesn't use this much simpler approach out of the box?
IP: --   

Apache Virtual Host Configuration - too complex - suggestion
keithy
Group: Member
Post Group: Newbie
Posts: 3
Status:
Ok, as long as I comment out the #Include vhosts line which contains the AMPPS vhost schem things appear to work.

Suggestion why dont you pront the output of

sudo /Applications/AMPPS/apache/bin/httpd -S

somewhere in the domain management part of AMPPS

and what about

sudo /Applications/AMPPS/apache/bin/httpd -t

cheers k.
IP: --   

Apache Virtual Host Configuration - too complex - suggestion
keithy
Group: Member
Post Group: Newbie
Posts: 3
Status:
My latest incarnation of simple virtual hosting.

Quote

# Virtual hosts
#Commented Out the following
#Include conf/extra/httpd-vhosts.conf

#Added
VirtualDocumentRoot {$path}/www/%0
VirtualScriptAlias {$path}/www/%0/cgi-bin/

IP: --   

Apache Virtual Host Configuration - too complex - suggestion
olind
Group: Member
Post Group: Newbie
Posts: 6
Status:
I'm just trying to setup this. Are you still using this setup and if so what happens to logging? Does it all end up in the big general log file?

That would work for me. I never use multiple sites at the same time on localhost (dev-machine).
IP: --   

Apache Virtual Host Configuration - too complex - suggestion
princeofnaxos
Group: Member
Post Group: Newbie
Posts: 8
Status:
I fully agree! The supplied form to create a host is completely jabberish to me.
I use local domain names using vcap.me, and need the virtual host to be like they are on the production server. Therefor, I added "Include conf/extra/myhosts/*.conf" to httpd.conf (instead of commenting out the line you mentioned).

In folder "myhosts", I create my own virtual host files. Example:

<VirtualHost 127.0.0.1:80>

ServerName mydomain.com.vcap.me

ServerAlias *.mydomain.com.vcap.me

DocumentRoot path-to-docroot

<Directory path-to-docroot>
    Options FollowSymLinks Indexes
    AllowOverride All
    Order deny,allow
    allow from All
</Directory>

ErrorLog /var/log/apache2/mydomain.com-error.log

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

CustomLog /var/log/apache2/mydomain.com-access.log combined

</VirtualHost>



Quote From : keithy April 8, 2017, 6:13 pm
My latest incarnation of simple virtual hosting.

Quote

# Virtual hosts
#Commented Out the following
#Include conf/extra/httpd-vhosts.conf

#Added
VirtualDocumentRoot {$path}/www/%0
VirtualScriptAlias {$path}/www/%0/cgi-bin/

IP: --   

Apache Virtual Host Configuration - too complex - suggestion
paxtonleiny
Group: Member
Post Group: Newbie
Posts: 8
Status:
I’m just setting the stage here. Do you still employ this system, and if so, how is logging handled? Is everything written to the master log file?

That would be fine with me. On localhost (the machine I use to create websites), I never have more than one site open at once.

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
2 guests, 0 users.


All times are GMT. The time now is March 19, 2024, 4:54 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.020