[kwlug-disc] Apache 403 & access.log questions

Charles M chaslinux at gmail.com
Fri Apr 5 13:19:26 EDT 2019


I was able to resolve the issue by whitelisting each folder I wanted
redirects to php in by adding in .htaccess the RewriteCond:

RewriteCond %{REQUEST_URI} !/help/me/[^/]*\.php$

So where /help/me is all the other folders /help/me2, /help/me3 all have a
rule like the one above. This was any php outside those specified don’t get
run.

>
>   RewriteCond %{REQUEST_URI} !/help/[^/]*\.php$
>
> But that didn't seem to help. It's worth mentioning that there are
> several sub-directories in the /help folder, not just /help/me that
> would need their php files run (but not redirected to).
>
> On Fri, Apr 5, 2019 at 12:39 AM Charles M <chaslinux at gmail.com> wrote:
> >
> > So if I touch index.html in the /help/me folder I get a white page as
> > I should. It specifically seems to be the index.php in /help/me that's
> > causing the 403. That index.php has the same user and owner as the
> > index.html, minus a group write (which didn't make a difference when I
> > briefly tried adding it).
> >
> > On Thu, Apr 4, 2019 at 11:21 PM Steve Izma <sizma at golden.net> wrote:
> > >
> > > On Thu, Apr 04, 2019 at 09:34:53PM -0400, Charles M wrote:
> > > > Subject: [kwlug-disc] Apache 403 & access.log questions
> > > >
> > > > When I surf to sitename/help/ access.log shows a 200 for the
> > > > index.html in that directory. However the index.html is just a
> > > > redirect to a subfolder below help called me/. That redirected folder
> > > > seems to be generating a 403 error. me/ has the same user and group
> > > > permission as well as the same access permissions - so I'm thinking
> > > > this has something to do with my main site apache configuration file?
> > >
> > > I'm not sure what you mean by a redirect -- do you mean that that
> > > sitename/help/index.html contains either an HTML <meta
> > > content=...> tag (or some sort of javascript) or do you mean that
> > > index.html is a symbolic link to something in the subdirectory?
> > > If it's a link, then the apache config or .htaccess needs
> > > "FollowSymLinks" as an option. I would think a symlink is more
> > > straight forward than an extra file with code in it.
> > >
> > >         -- Steve
> > >
> > > --
> > > Steve Izma
> > > -
> > > Home: 35 Locust St., Kitchener, Ontario, Canada  N2H 1W6
> > > E-mail: sizma at golden.net  phone: 519-745-1313  cell: 519-998-2684
> > >
> > > A: Because it messes up the order in which people normally read text.
> > > Q: Why is top-posting such a bad thing?
> > > A: Top-posting.
> > > Q: What is the most annoying thing in e-mail?
> > > <http://en.wikipedia.org/wiki/Posting_style>
> > >
> > >
> > > _______________________________________________
> > > kwlug-disc mailing list
> > > kwlug-disc at kwlug.org
> > > http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
> >
> >
> >
> > --
> > Charles McColm
> > Computer Recycling: http://www.comprec.org
> > Fasteroids: http://www.fasteroids.ca
> > Twitter/Identica/Google+: @chaslinux
>
>
>
> --
> Charles McColm
> Computer Recycling: http://www.comprec.org
> Fasteroids: http://www.fasteroids.ca
> Twitter/Identica/Google+: @chaslinux
>
-- 
Charles McColm
Computer Recycling: http://www.comprec.org
Fasteroids: http://www.fasteroids.ca
Twitter/Identica/Google+: @chaslinux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20190405/0de2dbb2/attachment.htm>


More information about the kwlug-disc mailing list