[users@httpd] Re: Unable to connect to Apache test website on LocalHost
On Tue, 12 Apr 2022 17:12:16 -0400, DiversityLink/Milt Spain wrote: > > Apache2.4 installed and operating on Widows 7. Test site is loaded at = > C:\Apache24\htdocs\testsite.com. Site index is loaded in the = > testsite.com folder as index (an htm file). Virtual Hosts is set up as: > > >=20 > ServerAdmin a...@example.com > DocumentRoot"C:Apache24/htdocs/" > ServerName testsite.com What I do: ServerName testsite.tst In /etc/hosts: 192.168.0.17www.testsite.tst testsite.tst In my case(s) the testsite.tst matches up with my production testsite.com (or .net , .org , etc.) which is hosted elsewhere. HTH Jonesy -- Marvin L Jones| Marvin | W3DHJ.net | linux 38.238N 104.547W | @ jonz.net | Jonesy | FreeBSD * Killfiling google & banter.com: jonz.net/ng.htm - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Unable to connect to Apache test website on LocalHost
Besides the ServerAlias, You probably also need to add DirectoryIndex index.html and also change your document root to the actual root directory where your website is located. - Y Sent from a device with a very small keyboard and hyperactive autocorrect. On Tue, Apr 12, 2022, 5:21 PM Eric Covener wrote: > On Tue, Apr 12, 2022 at 5:12 PM DiversityLink/Milt Spain > wrote: > > > > Apache2.4 installed and operating on Widows 7. Test site is loaded at > C:\Apache24\htdocs\testsite.com. Site index is loaded in the testsite.com > folder as index (an htm file). Virtual Hosts is set up as: > > > > > > > > ServerAdmin a...@example.com > > DocumentRoot"C:Apache24/htdocs/" > > ServerName testsite.com > > How about appending: > ServerAlias localhost > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >
Re: [users@httpd] Unable to connect to Apache test website on LocalHost
On Tue, Apr 12, 2022 at 5:12 PM DiversityLink/Milt Spain wrote: > > Apache2.4 installed and operating on Widows 7. Test site is loaded at > C:\Apache24\htdocs\testsite.com. Site index is loaded in the testsite.com > folder as index (an htm file). Virtual Hosts is set up as: > > > > ServerAdmin a...@example.com > DocumentRoot"C:Apache24/htdocs/" > ServerName testsite.com How about appending: ServerAlias localhost - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Unable to connect to Apache test website on LocalHost
Apache2.4 installed and operating on Widows 7. Test site is loaded at C:\Apache24\htdocs\testsite.com. Site index is loaded in the testsite.com folder as index (an htm file). Virtual Hosts is set up as: ServerAdmin a...@example.com DocumentRoot"C:Apache24/htdocs/" ServerName testsite.com ErrorLog "logs/testsite.log" ServerAlias www.testsite.com Custom Log "Logs/testsite.logs" common Using FireFox browser calling testsite.com goes to a live site on the internet. Calling local host brings up this: Index of / a.. testsite.com/ which in turn shows this: Index of /testsite.com a.. Parent Directory b.. index.htm I’ve researched everything I can think of on Google and haven’t been able to connect to the site index. Obviously I have an error somewhere. All assistance will be sincerely appreciated. Milt Spain
[users@httpd] Use mod_perl to change URL before reaching mod_rewrite?
Hi, I want to use mod_perl to change the url before it gets to mod_rewrite, is this possible? I currently use mod_rewrite to proxy certain requests to an app server. RewriteCond %{REQUEST_URI} ^/base1/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/base2/(.*)$ RewriteRule ^/(.*)$ https://my.appserver.com/$1 [P,L] This works fine. I wrote a mod_perl module hoping to change the url BEFORE it gets to mod_rewrite. But mod_rewrite still uses the original url. If I take mod_rewrite out of the picture, it looks like my perl module does change the url before Apache tries to hit the file system. My mod_perl runs as a TransHandler PerlTransHandler My::Module The short of the code is: my $uri = $r->uri(); $uri =~ SOME STUFF HERE TO CHANGE THE URI $r->uri($uri); #Internally modify the url If I am just hitting the file system, Apache uses the modified url from the perl module. But if I am using mod_rewrite to proxy, mod_rewrite is using the original url, before mod_perl makes any changes. Is it possible to use mod_perl to change the url before mod_rewrite starts its work? thank you
Re: [users@httpd] Log to syslog?
On Tuesday 12 April 2022 at 13:32:40, Paul Claridge wrote: > Did you find the info on loggly.com? I found https://www.loggly.com/ultimate-guide/centralizing-apache-logs/ and it was essentially a summary of the two mechanisms I had already found elsewhere and posted in my original question - telling rsyslog to track file contents written by Apache, or using logger in a CustomLog definition. > Not sure if it covers precisely your requirements. They look like they would work for me, however I regard them as "workarounds" and wanted to see whether anyone knew of a way to do it natively in Apache. I'm surprised that it appears not to be possible, but thanks to everyone for their responses so far. Antony. > On 12 Apr 2022, at 11:59, Marc wrote: > >>> i went through this issue the hard way > >> > >> Urgh - thanks for the comprehensive reply. > >> > >>> there does not seem to be anything at all as apache seems to be all > >>> file related > >> > >> I wonder why mod_syslog has not been made more generic? > >> > >>> redirecting to logger just does not work. > >>> > >>> i wrote a python script that uses sockets (assuming linux, freebsd etc) > >> > >> Yes, I'm on Linux - thanks for the script, and for the comments re > >> logger etc. > >> > >> *If anyone else has a suggestion for how Apache can log to syslog, I'm > >> still interested in other possible ways to achieve it!* > > > > I have been asking something similar a while ago, logggin to something > > like influx. I know how to redirect syslog to influx. So if I can > > redirect eg ip's and 2XX/4XX to syslog, that would be very interesting. -- Please apologise my errors, since I have a very small device. Please reply to the list; please *don't* CC me. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Log to syslog?
Did you find the info on loggly.com? Not sure if it covers precisely your requirements. Sent from my iPhone On 12 Apr 2022, at 11:59, Marc wrote: >>> i went through this issue the hard way >> >> Urgh - thanks for the comprehensive reply. >> >>> there does not seem to be anything at all as apache seems to be all file >>> related >> >> I wonder why mod_syslog has not been made more generic? >> >>> redirecting to logger just does not work. >>> >>> i wrote a python script that uses sockets (assuming linux, freebsd etc) >> >> Yes, I'm on Linux - thanks for the script, and for the comments re logger >> etc. >> >> *If anyone else has a suggestion for how Apache can log to syslog, I'm still >> interested in other possible ways to achieve it!* >> > > I have been asking something similar a while ago, logggin to something like > influx. I know how to redirect syslog to influx. So if I can redirect eg ip's > and 2XX/4XX to syslog, that would be very interesting. > > > ТÐÐ¥FòVç7V'67&–&RÂRÖ֖âW6W'2×Vç7V'67&–&T‡GGBæ6†Ræ÷&pФf÷"FF—F–öæÂ6öÖÖæG2ÂRÖ֖âW6W'2Ö†VLJGGBæ6†Ræ÷&pÐ - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
RE: [users@httpd] Log to syslog?
> > i went through this issue the hard way > > Urgh - thanks for the comprehensive reply. > > > there does not seem to be anything at all as apache seems to be all file > > related > > I wonder why mod_syslog has not been made more generic? > > > redirecting to logger just does not work. > > > > i wrote a python script that uses sockets (assuming linux, freebsd etc) > > Yes, I'm on Linux - thanks for the script, and for the comments re logger etc. > > *If anyone else has a suggestion for how Apache can log to syslog, I'm still > interested in other possible ways to achieve it!* > I have been asking something similar a while ago, logggin to something like influx. I know how to redirect syslog to influx. So if I can redirect eg ip's and 2XX/4XX to syslog, that would be very interesting.
Re: [users@httpd] Log to syslog?
On Tuesday 12 April 2022 at 12:33:01, Paul Kudla (SCOM.CA Internet) wrote: > i went through this issue the hard way Urgh - thanks for the comprehensive reply. > there does not seem to be anything at all as apache seems to be all file > related I wonder why mod_syslog has not been made more generic? > redirecting to logger just does not work. > > i wrote a python script that uses sockets (assuming linux, freebsd etc) Yes, I'm on Linux - thanks for the script, and for the comments re logger etc. *If anyone else has a suggestion for how Apache can log to syslog, I'm still interested in other possible ways to achieve it!* Thanks, Antony. -- Why is "dyslexia" so difficult to spell, and why can I never remember "aphasia" when I want to? Please reply to the list; please *don't* CC me. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Log to syslog?
Hi. I'd like to have Apache send all log entries to syslog instead of files (because I run a central syslog aggregator and want to have many servers all send their log files to this system). I have found: https://httpd.apache.org/docs/trunk/mod/mod_syslog.html However this appears only to be for Error Logs, whereas I would want _all_ logs to be sent to syslog. Can Apache do this? I have found some workarounds such as: https://serverfault.com/questions/1025281 https://kifarunix.com/forward-apache-logs-to-central-log-server-with-rsyslog/ however I would be more comfortable if there were a way to tell Apache I want it to talk directly to syslog, if this can be done. Thanks in advance, Antony. -- If you were ploughing a field, which would you rather use - two strong oxen or 1024 chickens? - Seymour Cray, pioneer of supercomputing Please reply to the list; please *don't* CC me. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org