Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Gallery2, mod_rewrite loaded but not working

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
BoBoeBoe
n00b
n00b
Posts: 69
Joined: Tue Feb 17, 2004 10:58 pm

Gallery2, mod_rewrite loaded but not working

  • Quote

Post by BoBoeBoe » Wed Oct 08, 2008 9:31 pm

I run Gallery2 on an Apache2 SSL Vhosts. Everything seems to work fine except for: mod_rewrite.

I checked that mod_rewrite is loaded using phpinfo

On the gallery2 page http://codex.gallery2.org/Gallery2:Modules:rewrite I found that I should add the line:

Code: Select all

<Directory /full/path/to/gallery2>
    AllowOverride FileInfo Options
</Directory>
to my apache config file. Whenever I add this line to my 00_default_ssl_vhost.conf

Oeps! I get an internal server error

Here I am at a point where I don't have a clue what could be wrong. Anyone any suggestions what to do?

This is what my apache error-log says:
[Wed Oct 08 23:15:09 2008] [alert] [client ip-address] /var/www/myvhost.mydomain.com/htdocs/gallery/.htaccess: deny not allowed here, referer: https://myvhost.mydomain.com/main.php?g ... =xdd972e49
If I remove this line from my 00_default_ssl_vhost.conf I get the following error when I access the plugins/rewrite page on my Gallery2 site ("URL Rewrite Setup"). The page detects that mod_rewrite is not working and it results in a similar entry in my apache error-log:
[Wed Oct 08 23:19:29 2008] [alert] [client ip-address] /var/www/myvhost.mydomain.com/htdocs/gallery/.htaccess: deny not allowed here, referer: https://myvhost.mydomain.com/main.php?g ... =xdd972e49
This is how my 00_default_ssl_vhost.conf looks like:

Code: Select all

<VirtualHost myserver-ip-address:443>
        Serveradmin webmaster@mydomain.com

        Documentroot /var/www/myvhost.mydomain.com/htdocs/gallery
        Servername myvhost.mydomain.com
        Serveralias myvhost

        SSLEngine on
        SSLCertificateKeyFile    /etc/apache2/ssl/myvhost.server.key
        SSLCertificateFile       /etc/apache2/ssl/myvhost.server.crt
        SSLOptions StrictRequire
        SSLProtocol all -SSLv2

        ErrorLog logs/gallery2-error_log
        CustomLog logs/gallery2-access_log common

        <Directory "/var/www/myvhost.mydomain.com/htdocs/gallery">
          SSLRequireSSL
          Options -Indexes FollowSymLinks
          AllowOverride None
          Order allow,deny
          Allow from all
#          AllowOverride FileInfo Options
        </Directory>

        <IfModule itk.c>
          AssignUserID apache apache
          MaxClientsVHost 50
        </IfModule>
     </Virtualhost>
Top
elgato319
Guru
Guru
Posts: 546
Joined: Thu Sep 15, 2005 9:45 am

  • Quote

Post by elgato319 » Thu Oct 09, 2008 6:37 am

seems more like a problem in "/var/www/myvhost.mydomain.com/htdocs/gallery/.htaccess"
could you post this too?
Top
BoBoeBoe
n00b
n00b
Posts: 69
Joined: Tue Feb 17, 2004 10:58 pm

  • Quote

Post by BoBoeBoe » Fri Oct 10, 2008 9:08 pm

Here is my "/var/www/myvhost.mydomain.com/htdocs/gallery/.htaccess"

Code: Select all

<Files ~ "\.(inc|class)$">
   Deny from all
</Files>

# BEGIN Url Rewrite section
# (Automatically generated.  Do not edit this section)
<IfModule mod_rewrite.c>
    RewriteEngine On

    # The path to your Gallery (in this case example.com/gallery2/)
    RewriteBase /var/www/myvhost.mydomain.com/htdocs/gallery/

    RewriteRule ^admin /gallery2/main.php?g2_view=core.SiteAdmin   [QSA,L]
</IfModule>
# END Url Rewrite section
Top
elgato319
Guru
Guru
Posts: 546
Joined: Thu Sep 15, 2005 9:45 am

  • Quote

Post by elgato319 » Sun Oct 12, 2008 9:07 pm

#<Files ~ "\.(inc|class)$">
# Deny from all
#</Files>
could you comment this and try if it's working?
Top
BoBoeBoe
n00b
n00b
Posts: 69
Joined: Tue Feb 17, 2004 10:58 pm

  • Quote

Post by BoBoeBoe » Mon Oct 13, 2008 11:33 pm

I commented the lines, but nevertheless it did not really help me any further.

Code: Select all

 URL Rewrite Setup
Apache mod_rewrite

Testing if mod_rewrite is supported by the server.
	
Warning
Custom Gallery directory test setup

Gallery tries to test mod_rewrite in action. For this to work you need to edit each of these two files accordingly:

/var/www/myvhost.mydomain.com/htdocs/gallery/modules/rewrite/data/mod_rewrite/custom/.htaccess
Line 6: RewriteBase /modules/rewrite/data/mod_rewrite/custom/

/var/www/myvhost.mydomain.com/htdocs/gallery/modules/rewrite/data/mod_rewrite_no_options/custom/.htaccess
Line 6: RewriteBase /modules/rewrite/data/mod_rewrite_no_options/custom/
Test mod_rewrite manually

For whatever reason, Gallery did not detect a working mod_rewrite setup. If you are confident that mod_rewrite does work you may override the automatic detection. Please, run these two tests to see for yourself.
Works 	Test
	mod_rewrite configuration 1 (with global Options +FollowSymlinks)
	mod_rewrite configuration 2 (with local Options +FollowSymlinks)

If one of the two tests gives you a page with the text PASS_REWRITE you are good to go.
Gallery .htaccess file

Testing if Gallery can write to the .htaccess file. 
Top
elgato319
Guru
Guru
Posts: 546
Joined: Thu Sep 15, 2005 9:45 am

  • Quote

Post by elgato319 » Tue Oct 14, 2008 8:12 am

well...
did you try the two tests the setup suggests?
Did you edit the two files like the setup suggests?

the setup seems to test if mod_rewrite is available, but it states that this check can be disabled.
Top
BoBoeBoe
n00b
n00b
Posts: 69
Joined: Tue Feb 17, 2004 10:58 pm

  • Quote

Post by BoBoeBoe » Sun Oct 19, 2008 5:42 am

Sorry that I wasn't that complete in my reply, but yes of coarse I did.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic