Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st August 2008, 11:07
comptcarlik comptcarlik is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Thanks: 2
Thanked 0 Times in 0 Posts
Default htaccess not working with ISPconfig

hi . can anyone help . how can i get htaccess to work on a server working perfectly with ISPconfig . this is the first time i am using ISPconfig it really come in handy . so i am afraid to bust something . thanks
Reply With Quote
Sponsored Links
  #2  
Old 31st August 2008, 12:40
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,259
Thanks: 215
Thanked 648 Times in 294 Posts
Default

You can not use .htaccess files for the site, because the use of .htaccess files is not allowed on your system.
To allow .htaccess files for a single site, enter the following to the apache directives field on the basis tab of the web within ISPConfig:

<Directory "/var/www/web#/web">
Options FollowSymLinks
AllowOverride All
</Directory>

Note: web# is the webnumber as created by ISPConfig.

Alternative:
Allow the use of .htaccess files on your server globaly, by changing AllowOverride None into AllowOverride All within your Apache configuration file.
Restart Apache afterwards.
__________________
Hans

MrHostman | Master in managed hosting
Reply With Quote
  #3  
Old 31st August 2008, 16:23
bidevi bidevi is offline
Member
 
Join Date: Jun 2007
Posts: 60
Thanks: 3
Thanked 2 Times in 2 Posts
Default more about .htaccess

Hans wrote:

Allow the use of .htaccess files on your server globaly, by changing AllowOverride None into AllowOverride All within your Apache configuration file.
Restart Apache afterwards.


Sorry Hans, unclear for newbies.

1. What is the Apache configuration file? Is this etc/apache2/apache2.conf or some other file?

2. In apache2.conf there are a lot of AllowOverride lines. Which one do we change from what into what or must we add something?

3. And when you state: Restart Apache afterwards, could you, for the sake of helping newbies, please give the command: /etc/init.d/apache2 force-reload?

Thanx in advance for your help
Reply With Quote
  #4  
Old 31st August 2008, 21:37
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,259
Thanks: 215
Thanked 648 Times in 294 Posts
Default

@bidevi,

Here is more specific information:

Within the /etc/apache2/apache2.conf file (somewhere at the end) you find the following lines:

<Directory /var/www/*/web>
Options +Includes -Indexes
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

To allow .htaccess files globally on your system (within all the webs created by ISPConfig) change AllowOverride None, into: AllowOverride All

After saving the configuration file, restart apache2 again with:
/etc/init.d/apache2 restart or /etc/init.d/apache2 force-reload
__________________
Hans

MrHostman | Master in managed hosting
Reply With Quote
  #5  
Old 1st September 2008, 00:34
bidevi bidevi is offline
Member
 
Join Date: Jun 2007
Posts: 60
Thanks: 3
Thanked 2 Times in 2 Posts
Default still no luck with .htaccess

I followed the instructions as given above.

Then I opened my browser to open my own webpage which is protected with a .htaccess user & password. It works on my Fedora configuration without ISPConfig.

With ISPConfig on Debian Etch I get this:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mysite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c Server at www.mysite.com Port 80


Any suggestions?
Reply With Quote
  #6  
Old 1st September 2008, 00:57
bidevi bidevi is offline
Member
 
Join Date: Jun 2007
Posts: 60
Thanks: 3
Thanked 2 Times in 2 Posts
Default My own stupidity

Everything works.

Since the path from .htaccess to .htpasswd is not identical on different systems I had to make adjustments.

After I did that, everything worked.

I decided to put this on line for other newbies.
Reply With Quote
  #7  
Old 1st September 2008, 02:54
comptcarlik comptcarlik is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Thanks: 2
Thanked 0 Times in 0 Posts
Default htaccess not working with ISPconfig

thank you for your help. i guess i am still doing something wrong . first i was a bit afraid to touch the http.conf file since this is the first time i am using ISPconfig i didn't know how it will react after restarting apache .
i tried all the solution posted above but none seems to work
i am using fedora 9 so i guess my http.conf file is found under /etc/httpd/conf/http.conf
first of all i added

<Directory "/var/www/web#/web">
Options FollowSymLinks
AllowOverride All
</Directory>
replacing # by the number the server gave me that was 8 on the ISPconfig apache Directives
(didn't work after rebooting )
i tried globally both first adding it to the ISPconfig apache directives and the editing my http.conf file ...
(didn't work after rebooting)
i also tried

<Directory /var/www/*/web>
Options +Includes -Indexes
AllowOverride All
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
both on the ISPconfig apache directives and the http.conf file
(still didn't work )
i was wondering if folder listing could have something to do with it .
my server doesn't allow folder listing on none of the virtual servers i figure out on our old SUSE server that htaccess only worked if folder listing was allowed . but i am not sure about that .
Reply With Quote
  #8  
Old 1st September 2008, 17:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Either put something like

Code:
<Directory "/var/www/web#/web">
AllowOverride All
</Directory>
in the APache Directives field of that web site in the ISPConfig interface, or...

Quote:
Originally Posted by comptcarlik View Post
i also tried

<Directory /var/www/*/web>
Options +Includes -Indexes
AllowOverride All
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
both on the ISPconfig apache directives and the http.conf file
(still didn't work )
... try
Code:
<Directory /var/www/*/web>
Options +Includes -Indexes
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
instead.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
comptcarlik (2nd September 2008)
  #9  
Old 2nd September 2008, 10:16
comptcarlik comptcarlik is offline
Junior Member
 
Join Date: Aug 2008
Posts: 10
Thanks: 2
Thanked 0 Times in 0 Posts
Default htaccess not working with ISPconfig

thanks for your solution falko .
i guess i have a mis configuration in the apache server . i tried your solution . i still can't get any of them to work .. i guess there is a global directive over taking the optional directives . how can i figure ou what should be commented out in the http.conf file . everytime i make a change i reboot the server hoping it will work . still not working .
Reply With Quote
  #10  
Old 3rd September 2008, 12:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
 
Default

Can you post your Vhosts_ispconfig.conf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload ins't working good in ispconfig on ubuntu 6.06 djmostek Installation/Configuration 11 24th August 2007 22:14
vhost not working on ISPConfig 2.2.13 tannnk Installation/Configuration 2 22nd June 2007 14:31
fastcgi and php with ispconfig tosser Tips/Tricks/Mods 3 25th June 2006 21:01
FC4 Setup DNS and ISPCONFIG issues The General Installation/Configuration 7 15th May 2006 09:45
ISPconfig not working Venkatesh.S Installation/Configuration 2 28th July 2005 13:28


All times are GMT +2. The time now is 11:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.