Re: [us...@httpd] Re: how do I *define* a default virtual host

2009-09-15 Thread Jan G.B.
2009/9/15 LuKreme 

> On 15-Sep-2009, at 01:54, Krist van Besien wrote:
>
>> On Tue, Sep 15, 2009 at 9:02 AM, robert rottermann 
>> wrote:
>>
>>> hi ther,
>>> I load my VH's from a directory with a number of VH's
>>>
>>> is it possible to define which one is the default one?
>>>
>>> it seems to select the first in alphabetical order.
>>>
>>
>> I asume you have one config that pulls in the VH's configs via an
>> include statement. Something like:
>>
>> Include /etc/httpd/vhosts/*.conf
>>
>> In that case they are indeed loaded in alphabetical order, as that is
>> the way the OS sorts files by default.
>>
>
> I always put my default VirtualHost directly into the httpd.conf file, just
> before the Include line.
>
> This way there is no question about which directive is the default, and I
> am not dependent on filename order.
>
>
> I'd say this way it's always unclear which is the default vhost. As you
have to dig through  instead of just issuing a `cat
/etc/apache2/sites-enabled/*` or just `ls`.

As the example shows, there's also no easy way of disabling the vhost
on-the-fly  (ie: rm ). ;-)

Regards.


Re: [us...@httpd] Re: how do I *define* a default virtual host

2009-09-16 Thread Jan G.B.
2009/9/15 LuKreme 

> On 15-Sep-2009, at 09:34, Jan G.B. wrote:
>
>> 2009/9/15 LuKreme 
>>
>>> I always put my default VirtualHost directly into the httpd.conf file,
>>> just
>>> before the Include line.
>>>
>>>
>  I'd say this way it's always unclear which is the default vhost. As you
>> have to dig through  instead of just issuing a `cat
>> /etc/apache2/sites-enabled/*` or just `ls`.
>>
>
> apachectl -S
>
>  As the example shows, there's also no easy way of disabling the vhost
>> on-the-fly  (ie: rm ). ;-)
>>
>
> I've never needed to disabled vhosts completely like that.
>
> However, I thought if you had NameVirtualHost set and had no Vhosts
> directives that was an error in configuration.
>
>
> Great, thanks. I never noticed the show switch '-S'. That's handy.

For disabling vhosts: it happens from time to time, when you administer
several sites with different mandants, white label stuff and alike

Regards


Re: [us...@httpd] Vhost shortcut?

2009-04-09 Thread Jan G.B.
2009/4/9 Griffith, Michael * :
> I have some difficult users, who want to just type in a partial URL (in
> this case "tracking") as the URL and be directed to an app that is
> located on a server with a DNS entry tracking.domain.com.
>

Guessing the clients can resolve "tracking" to the correct server
through the DNS you've set up
Otherwise the IE(vil) Users must add that custom hostname and the
correcponding IP-address in their hosts file.

then I'd set up a virtual host like that...


ServerName tracking
Redirect / http://tracking.somewhere.else/


No need to have a docroot etc.

byebye



> I suggested setting a browser bookmark, but was rebuffed. Browser is
> IE6, if that makes any difference. The problem is this used to work on a
> different server.
>
> Is there a way to configure the vhost to recognize the partial url and
> direct them to the app?
>
> In other words typing in --> tracking in the url would be the equivalent
> of http://tracking.domain.com/
>
> Here's what my vhost entry looks like:
>
> # Tracking Vhost
> 
>    
>      Options Indexes FollowSymLinks
>      AllowOverride None
>      Order allow,deny
>      Allow from all
>    
>    DocumentRoot /www/docs/tracking
>    DirectoryIndex index.html index.jsp index.htm index.php
>    ServerName tracking.domain.com
>    ServerAlias tracking.domain.com
>    OPtions ExecCGI Includes MultiViews SymLinksIfOwnerMatch Indexes
> -FollowSymLinks
>    JKMount /tracking/* ajp13
>    JKMount /tracking ajp13
> 
>
> Any reply would be appreciated!
>
> MG
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Vhost shortcut?

2009-04-09 Thread Jan G.B.
2009/4/9 Griffith, Michael * :
> Eric,
>
> Thanks for the quick reply. I have to admit I am a novice with Apache
> config.  Something like this would do the trick?
>
> RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]
>
> Cheers!
> mg
>

Well.. something like this in your .htaccess
 (this is assuming your www server already responds to the name
tracking => after you added "tracking" in your vhost configuration.)

RewriteCond %{HTTP_HOST} ^tracking$ [NC]
RewriteRule ^(.*)$ http://tracking.v2.localdomain/$1?%{QUERY_STRING} [R=301,L]



byebye

> -Original Message-
> From: Eric Covener [mailto:cove...@gmail.com]
> Sent: Thursday, April 09, 2009 10:06 AM
> To: users@httpd.apache.org
> Subject: Re: [us...@httpd] Vhost shortcut?
>
> On Thu, Apr 9, 2009 at 10:58 AM, Griffith, Michael *
>  wrote:
>> I have some difficult users, who want to just type in a partial URL
>> (in this case "tracking") as the URL and be directed to an app that is
>
>> located on a server with a DNS entry tracking.domain.com.
>
> As long as DNS gets them to your server, you want "ServerAlias tracking"
> and maybe one of the canned "canonical hostname" rewrite rules in the
> manual.
>
> --
> Eric Covener
> cove...@gmail.com
>
> -
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] RAM problem w/ multiple Apache processes

2009-05-04 Thread Jan G.B.
2009/5/4 Rex C. Eastbourne :
> 2009/5/4 Matus UHLAR - fantomas :
>> [...]
>> how much of RAM do you have on that machine?
>>
>
> 512 MB. Not a lot, I know, but I had thought it would be sufficient to
> run a website with low traffic like mine.
>
>>
>> Do you use ubuntu's apache package(s)? Don't you have too much of useless
>> modules loaded?
>>
>
> Through apt-get I have installed Apache2 and mod_python. I don't have
> many useless modules loaded; baseline memory usage is only around 60
> MB.
>
> Any ideas? Is it normal for there to be dozens of Apache processes like this?
>
> Thanks,
>
> Rex
>




Hi Rex,

it's quite normal: as more visitors come along, more apache processess
will be spawned. You can set up how much processes are reserved, how
many are allowed and so on. Just have a look in your server config.

One apache process will consume as much RAM as your most complex page
will require to render. So if you serve different, static and simple
HTML files 1 and one php script using 200MB of ram, one process
will use 200MB at least.

You should tweak your config by calculating how many processes your
server will handle with the installed application on it.
You'll find a lot of pages describing the optimization process and the
needed config-options. Try Google or look into the apache docs! All
options and the stuff I was writing is well described there.

Bye, Jan

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Little explanation

2009-05-05 Thread Jan G.B.
2009/5/5 Morten K. Poulsen :
> Hi Darvin,
>
> On Tue, 2009-05-05 at 12:07 -0300, Darvin Denmian wrote:
>> 
>>     StartServers            8
>>     MinSpareServers    5
>>     MaxSpareServers   20
>>     ServerLimit              288
>>     MaxClients              256
>>     MaxRequestsPerChild  4000
>> 
>>
>> There is a good soul that can explain each directive listed above?
>
> Yes.
>
> http://www.lmgtfy.com/?q=StartServers&l=1
>
> Best regards,
> Morten
>


Damn, you're too fast.. I was about to post http://tinyurl.com/cme8da

:-)
> --
> Morten K. Poulsen 
> CTO, FableTech
> http://fabletech.com/
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Rewrite Help

2009-05-05 Thread Jan G.B.
Something like that?

ReWriteCond %{QUERY_STRING} city=([^&]+)&state=([A-Za-z]+)
RewriteRule
^content/meeting-search
civicrm/contact/search/custom?csid=14&reset=1&%{QUERY_STRING}



Regards



2009/5/5 Mike Steigerwald :
> Hi all,
>
> I'm struggling to learn Rewrite, and I'm weak on regexp in general. Does
> anyone have time to share suggestions for rewriting URLs like:
>
> http://aameetinglocator.org/content/meeting-search?city=Bemidji&state=MN
>
> to
>
> http://aameetinglocator.org/civicrm/contact/search/custom?csid=14&reset=1&city=Bemidji&state=MN
>
> ?
>
> Note that I need to 'keep' city and state using backreference, but I haven't
> even gotten that far yet.
>
> I've tried to follow the examples in the rewrite guide, but after two days
> I'm realizing I need to swallow my pride and reach out for help.
>
> Many thanks in advance for any guidance.
>
> Mike Steigerwald
> Executive Director
> www.PublicComputingServices.org
>

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Virtual Host port forwarding

2009-05-12 Thread Jan G.B.
2009/5/12 zm :
>
> Hi,
>
> I've installed Apache HTTP Server 2.2.11 and I'm trying to configure it to
> do the following trick:
>
> I have 1 server, connected through 1 router. I payed for domain
> "mydomain.com" (ficticious), and it will point toward my router with
> success.
>
> My router forwards port 80 to my server IP (192.168.1.1), also to port 80.
>
> In my server, I have 2 services running:
>
> Apache HTTP server on port 80
> Webserver (tomcat) on port 8080
> SVN server on port 8081
>
> I want my apache server on port 80 to make the following forwardings:
>
> if "www.mydomain.com" forwards to "192.168.1.1:8080"
> if "svn.mydomain.com" forwards to "192.168.1.1:8081"
> if anything else, fails ... or maybe to a static apache server page that
> presents some static html page, saying "hello there, go away" (it could be
> defined on apache http server itself).
>
> Is it possible to do that?


Yes, that would be possible with Name Based Virtualhosts in
conjunction with mod_proxy.
Please look term that up with a searchengine, as there should be
plenty of examples.

There might be other approaches that can lead to success.



PS: no need to post your message three times, just because the
"Thanks" ist missing. :-)




>
> What configs should I put on "httpd.conf" VirtualHost?
>
> I'm trying with something like:
Like
NameVirtualHost *:80
 
ServerName foobar.org
DocumentRoot /your/blank/page/dir
 



 
ServerName svn.foobar.org

ProxyRequests On


Order deny,allow
 Allow from all


ProxyPass / http://192.etc:8081/
ProxyPassReverse / http://192.etc:8081/

 


and so on.
(Example is straight outta http://httpd.apache.org/docs/2.0/mod/mod_proxy.html )

Regards

 
ServerName foobar.org
DocumentRoot /your/blank/page/dir
 


> 
>    ServerName 192.168.1.1:8081
> 
>
> Should this work?
> --
> View this message in context: 
> http://www.nabble.com/Virtual-Host-port-forwarding-tp23504328p23504328.html
> Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org