www.example.com has two subdomains subdomain1.example.com and subdomain2.example.com. The .htaccess file in the public_html gives 500 internal server error on both www.example.com and subdomain2.example.com. subdomain1.example.com gives 403 forbidden error.

If I remove the .htaccess file in the public_html, www.example.com and subdomain2.example.com works fine while the subdomain1.example.com gives lists the files and directories (like files, settings.php, themes, modules).

This started to happen after a major upgrade (from 6.26 to 7.14) I made sure that I copy the .htaccess file as is.

Also drupal has put a .htaccess in the subdomain1.example.com and also under sites/default/files

Any help would be appreciated.

Comments

BTMash’s picture

What are the settings of your setup? It sounds like there is something wrong in there but I am unsure. Also, when you said you copied the .htaccess file as is, are you saying that you are using the .htaccess file from your D6 site? I cannot recall the differences off hand but you should be using the .htaccess file that came with D7 (and then add in whatever customizations you have).
sites/default/files should have a .htaccess file. This is supposed to be to prevent users from being able to list the contents of that directory and various other security measures.

anujosh’s picture

I had no customisation in the D6 site and I used the one that came in Drupal 7. When I contacted the Service provider, this is what he said

"Unfortunately I have no idea - this is specific to your site, the server runs
plain vanilla Ubuntu Linux 10.04. There is nothing odd or customized about
our server LAMP installs.

It looks like you are having trouble with your .htaccess files - Syminet does
not get involved with server side programming or custom mod_rewrite code.
This part is entirely up to you.

I would recommend you get on the Drupal forums and ask people there.
Your virtualhost configuration may need some change, I will paste them
here so you can share that:


ServerAdmin webmaster@karnatakaeducation.org.in
DocumentRoot /home/ppu/public_html
ServerName www.karnatakaeducation.org.in
ServerAlias karnatakaeducation.org.in
CustomLog /home/ppu/logs/access.log "combined"
ErrorLog /home/ppu/logs/error.log
ScriptAlias /cgi-bin/ /home/ppu/cgi-bin/
# Errordocument 404 http://www.karnatakaeducation.org.in/404.php

AllowOverride Options FileInfo AuthConfig
php_admin_value safe_mode Off
php_admin_value register_globals Off


ServerAdmin webmaster@karnatakaeducation.org.in
DocumentRoot /home/ppu/public_html
ServerName rmsa.karnatakaeducation.org.in
CustomLog /home/ppu/logs/access.log "combined"
ErrorLog /home/ppu/logs/error.log
ScriptAlias /cgi-bin/ /home/ppu/cgi-bin/
# Errordocument 404 http://www.karnatakaeducation.org.in/404.php

AllowOverride All
php_admin_value safe_mode Off

"

mdupont’s picture

Priority: Major » Normal
Jooblay.net’s picture

We have touched on the Error 500s on this thread http://drupal.org/node/1691388, it seems that the Error 500 is only caused by your php.ini file and or memory_limit in setting.php.

As BTmash said there is some confusion on what these setting should be but we have 14 subdomains with over 50 modules in each site and have boosted our php.ini to 2056M:)
This seems high but all 500 Errors have gone away each time we have raised this limit as we built our sites. Also there is a lot of documentation online about 500 Errors only being caused by memory errors.
Which would explain why adding 2 more subdomains to your hosting account would cause this to happen.

I would check your php.ini file and at least set that to 512M BTmash said 256M should do it. This could be. You can also add:
ini_set('memory_limit', '256M');
to your settings.php file in sites/default/setting.php for each site.
Not sure if this helps at all:)

Version: 7.14 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.