500 internal server error

Status
Not open for further replies.

brianspl

New Member
Messages
3
Reaction score
0
Points
1
I'm getting a 500 internal server error, I think I messed up my htaccess file or something...I was never getting the error, I never did any changes on my index page so any Ideals
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi brianspl,

There were a couple of problems with your .htaccess file that was causing this. You had a line starting with the word ".htaccess", which is an invalid command, and I have commented out the line. Additionally, your Order commands had a space ("deny, allow" instead of "deny,allow"), which I have corrected, and your site is now working again. :)

Thank you,
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Guys, please do check your .htaccess file as pointed out by Dead-i by either commenting out bad commands (according to Apache), removing, adding or just renaming the file.

.htaccess is a web server configuration file which can apply its settings to the entire directory it is within, if it is not set up to exactly how it should be then the webserver is going to throw a 500 Internal Server Error (hint is in the name). You can always look into the server (Apache) log in CPanel to see what errors are being thrown within the log.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Guys, please do check your .htaccess file as pointed out by Dead-i by either commenting out bad commands (according to Apache)
the [ .htacess ] file in my [ public_html ] folder is 6 KiB in size with 220 lines of code - could you find the extra 'space' character that Apache did not like - after you found
which [ .htacess ] file it was in ?
how would a average user - of a x10hosting's free-hosting account - know what to look for ?

...removing, adding or just renaming the file.
if you do that - it could kill you site or make more errors - the [ .htacess ] file(s) is there for a reason

.htaccess is a web server configuration file which can apply its settings to the entire directory it is within
and to all folders below the one it is in

if it is not set up to exactly how it should be then the webserver is going to throw a 500 Internal Server Error (hint is in the name).
Apache could like your [ .htacess ] file - and you could receive a "500 Internal Server Error" for some other reason
"500 Internal Server Error" is a generic error message, given when no more specific message is suitable. There are a number of causes for a 500 Internal Server Error to display in your web browser

You can always look into the server (Apache) log in CPanel to see what errors are being thrown within the log.
x10hosting's free-hosting accounts do not have access to Apache's (server) log files
 
Last edited:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi sontechs,

You had the following line in your .htaccess file which was causing problems. I've commented out the line for you. ;)

Code:
Directoy listing

Thank you,
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
the [ .htacess ] file in my [ public_html ] folder is 6 KiB in size with 220 lines of code - could you find the extra 'space' character that Apache did not like - after you found which [ .htacess ] it was in ?
how would a average user - of a x10hosting's free-hosting account - know what to look for ?


if you do that - it could kill you site or make more errors - the [ .htacess ] file(s) is there for a reason


and to all folders below the one it is in


Apache could like your [ .htacess ] file - and you could receive a "500 Internal Server Error" for some other reason
"500 Internal Server Error" is a generic error message, given when no more specific message is suitable. There are a number of causes for a 500 Internal Server Error to display in your web browser


x10hosting's free-hosting accounts do not have access to Apache's (server) log files
Yes, the 500 internet server error message can appear for any reason, what I was saying is that it is server related which means the .htacess file could be to do with it.

At the moment, xo2 is down so I cannot check CPanel for the server log, though I think I saw it somewhere..

I was going to say that .htaccess would apply to the folders within the directory but I thought that it would be an obvious pick-up to some users.

It is more of if you can be bothered and if you know how the commands should be laid out, there could be obvious bad formatting which can just be removed or something. I have said to rename or comment certain lines of the file, not delete the actual file. That means that they don't have to go into the file and do changes if it is large (assuming that it is a CMS), they can wait for a member of staff can sort it out as an option (if they say on the forums of course).

Saying that removing a .htaccess file or changing commands for it to work would kill the site is like saying that you can't solve it at all. I have plenty of sites and some don't have a .htaccess file at all and yet still worked.

You can track down the troubling file using some logic. See which directories are having the error, rename a file in a directory to see if that removes that 500 error (of course rename it back) and then have a look at it if it is the suspect.
 
Status
Not open for further replies.
Top