PDA

View Full Version : 500 Internal Server Error



Eydalvur Carlsson
July 5, 2021, 12:15 AM
What could the cause be for this problem?
I have made no changes at all, this issue just came on.

Any solution?

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

Please contact the server administrator at .com to inform them of the time this error occurred, and the actions you performed just before this error.

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

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Joe Can
July 5, 2021, 01:13 AM
Do you own your own server or do you have a hosting company?

Eydalvur Carlsson
July 5, 2021, 02:21 AM
Its a hosting company

Joe Can
July 5, 2021, 03:03 AM
So you say it was working before, but it is not working now.

Have you consulted your hosting company?

Wei Hong
July 5, 2021, 03:07 AM
From my experience, the 500 error is hosting problem. Overload or problem make it unable to connect to the server, you better ask the host provider support to check the issue.

Eydalvur Carlsson
July 9, 2021, 12:19 AM
This is the error I found. How do I fix this?
[Thu Jul 08 16:50:08.746035 2021] [core:alert] [pid 1828992:tid 140457654486784] [client 88.85.52.81:64505] /home/me1974/public_html/.htaccess: </IfModule> without matching <IfModule> section

Joe Can
July 9, 2021, 12:22 AM
What version of Flynax are you using?

Eydalvur Carlsson
July 9, 2021, 12:31 AM
Its the latest 4.8.2

Joe Can
July 9, 2021, 04:01 AM
This is the error I found. How do I fix this?
[Thu Jul 08 16:50:08.746035 2021] [core:alert] [pid 1828992:tid 140457654486784] [client 88.85.52.81:64505] /home/me1974/public_html/.htaccess: </IfModule> without matching <IfModule> section

Please let me know if this gets confirmed as a bug, so I can add it to the Bug Tracker Report.

Jenő Kocsi
July 9, 2021, 05:25 AM
See if you accidentally have a hidden .htaccess file. It can also cause the error.
I also have version 4.8.2 above and I haven't encountered any bugs.

Also upload your .htaccess file to see if there is an error. This is because a # misplacement can cause this error.

Eydalvur Carlsson
July 9, 2021, 11:57 PM
I found two htaccess files in the public html. Cant seem to upload files to the forum, says invalid file.

Jenő Kocsi
July 10, 2021, 03:43 AM
There should be only one .htaccess file in the public_html folder. It is likely that the problem is that there are two in it.

Joe Can
July 10, 2021, 04:25 AM
Do both files have the same name and extensions?

Sometimes, the second one has a different name or extension, so as not to overwrite the original file on the server.

Eydalvur Carlsson
July 10, 2021, 01:13 PM
Thank you for the assistance with this issue.
Im realy a boat without a paddle when it comes to these problems :o)

I can only see the files when I enable show hidden files.
One is called "htaccess" and one "htaccess.admin_edit_htaccess_too_big.1625386491"

Eydalvur Carlsson
July 10, 2021, 01:17 PM
# Configures the footer on server-generated documents
ServerSignature Off

# enable apache morRewrite module
RewriteEngine on

# The URL prefix to be used for per-directory
RewriteBase /

# Block BAD user agents
# Note: The final RewriteCond must NOT use the [OR] flag.

# Return 403 Forbidden error.
RewriteRule .* index.php [F]

# The following rules are for bandwidth-hogging download tools

# This line denies access to all of the above tools
</IfModule>

# Block possible mySQL injections
RewriteCond %{REQUEST_METHOD} ^(PUT|CONNECT|HEAD|TRACE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
RewriteCond %{HTTP_COOKIE} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC,OR]
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999} [NC,OR]
RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|updat e|md5|benchmark) [NC,OR]
RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC]
# Note: The final RewriteCond must NOT use the [OR] flag.

# Return 403 Forbidden error.
RewriteRule .* index.php [F]

# set files headers
<IfModule mod_headers.c>
<FilesMatch "\.(png|gif|jpg|jpeg|woff)$">
Header set Cache-Control "max-age=5356800, public, must-revalidate"
</FilesMatch>

<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2678400, public, must-revalidate"
</FilesMatch>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
Header append Connection keep-alive
<FilesMatch ".(eot|ttf|otf|woff|tmpl|js|css|jpg|png|svg|gif)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

# deflate static content
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/x-component text/css application/x-javascript application/javascript
</IfModule>

# http://httpd.apache.org/docs/2.2/mod/mod_expires.html
<ifmodule mod_expires.c>
<filesmatch ".(css|js|png|gif|jpg|jpeg|htc)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</filesmatch>
</ifmodule>

# allow request methods
<Limit POST PUT DELETE GET OPTIONS HEAD>
Order deny,allow
</Limit>

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/templates

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f

ErrorDocument 404 /404.html


#RewriteCond %{REQUEST_URI} !(\.[a-z]+)$ [NC]

#RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/]|\?.+)$ [NC]
RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/])$ [NC]

# define system languages
#RewriteRule ^([a-zA-Z]{2})$ index.php?page=$1 [QSA,L]

# define paging
RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).html$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]

# define listing
#RewriteRule ^(([\w\-\_]+)?/)([^/]+)(/.+)-l?([0-9]+).html$ index.php?page=$2&rlVareables=$3$4&listing_id=$5 [QSA,L]
RewriteRule ^([^/]+)(/?(.{2,}))?-l?([0-9]+).html$ index.php?page=$1&rlVareables=$3&listing_id=$4 [QSA,L]

# wildcard request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} ^\/
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteCond %{HTTP_HOST} \.{2,} [NC] # 1 is localhost usage, 2 is global usage
RewriteCond %{HTTP_HOST} ^([^\.]+)\..+\.+ [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+) [NC]
RewriteRule (.*) index.php?page=%1&wildcard&rlVareables=$1 [QSA,L]

# account request (sub-directory)
RewriteRule ^((\w{2})/)?([\w-_]{3,})$ index.php?page=$3&lang=$2&account_request [QSA,L]

# define single pages
RewriteRule ^([^//]+)/?(^/*)?.html$ index.php?page=$1 [QSA,L]

# define other pages
RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.html|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]

Jenő Kocsi
July 10, 2021, 01:22 PM
line 19 is the error. </IfModule> it doesn't have to be there. Try it without it.

Eydalvur Carlsson
July 10, 2021, 01:34 PM
This is the error now on the page after I deleted line 19

Forbidden
You don't have permission to access this resource.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Jenő Kocsi
July 10, 2021, 01:42 PM
Which version of flynax are you using? The original .htaccess file should be uploaded, because what I put in here is pretty incomplete.

Eydalvur Carlsson
July 10, 2021, 01:44 PM
4.8.0, this issue just happend. There have been no changes or editing made to the site.

Jenő Kocsi
July 10, 2021, 01:49 PM
Then upload the .htaccess file released for version 4.8.2, because what you have now is not the same as the original.

Eydalvur Carlsson
July 10, 2021, 01:51 PM
Ok,where would I find that file? Will it make any changes to the users on the site etc?

Eydalvur Carlsson
July 10, 2021, 01:53 PM
This is the other file.

# Configures the footer on server-generated documents
ServerSignature Off

# enable apache morRewrite module
RewriteEngine on

# The URL prefix to be used for per-directory
RewriteBase /

# Block BAD user agents
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
# Note: The final RewriteCond must NOT use the [OR] flag.

# Return 403 Forbidden error.
RewriteRule .* index.php [F]

# The following rules are for bandwidth-hogging download tools
<IfModule mod_setenvif.c>
SetEnvIf user-agent "libwww-perl" stayout=1
SetEnvIf user-agent "Download Demon" stayout=1
SetEnvIf user-agent "GetRight" stayout=1
SetEnvIf user-agent "GetWeb!" stayout=1
SetEnvIf user-agent "Go!Zilla" stayout=1
SetEnvIf user-agent "Go-Ahead-Got-It" stayout=1
SetEnvIf user-agent "GrabNet" stayout=1
SetEnvIf user-agent "TurnitinBot" stayout=1

# This line denies access to all of the above tools
deny from env=stayout
</IfModule>

# Block possible mySQL injections
RewriteCond %{REQUEST_METHOD} ^(PUT|CONNECT|HEAD|TRACE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
RewriteCond %{HTTP_REFERER} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_COOKIE} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC,OR]
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999} [NC,OR]
RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|updat e|md5|benchmark) [NC,OR]
RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC]
# Note: The final RewriteCond must NOT use the [OR] flag.

# Return 403 Forbidden error.
RewriteRule .* index.php [F]

# set files headers
<IfModule mod_headers.c>
<FilesMatch "\.(png|gif|jpg|jpeg|woff)$">
Header set Cache-Control "max-age=5356800, public, must-revalidate"
</FilesMatch>

<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2678400, public, must-revalidate"
</FilesMatch>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
Header append Connection keep-alive
<FilesMatch ".(eot|ttf|otf|woff|tmpl|js|css|jpg|png|svg|gif)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

# deflate static content
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/x-component text/css application/x-javascript application/javascript
</IfModule>

# http://httpd.apache.org/docs/2.2/mod/mod_expires.html
<ifmodule mod_expires.c>
<filesmatch ".(css|js|png|gif|jpg|jpeg|htc)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</filesmatch>
</ifmodule>

# allow request methods
<Limit POST PUT DELETE GET OPTIONS HEAD>
Order deny,allow
Allow from All
</Limit>

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/templates
RewriteRule templates\/(.*?\/)(.*)$ templates/template_core/$2 [L]

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [L]

ErrorDocument 404 /404.html

RewriteRule ^api/v[0-9]+/?.*$ plugins/api/request.php [QSA,L]

# non .html redirect
#RewriteCond %{REQUEST_URI} !(\.[a-z]+)$ [NC]
#RewriteRule ^([^\/]{3,})/$ http://%{HTTP_HOST}/$1.html [NC,L,R=301]

# non trailing redirect
#RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/]|\?.+)$ [NC]
RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/])$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI}/ [NC,L,R=301]

# define system languages
#RewriteRule ^([a-zA-Z]{2})$ index.php?page=$1 [QSA,L]

# define paging
RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).html$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]

# define listing
#RewriteRule ^(([\w\-\_]+)?/)([^/]+)(/.+)-l?([0-9]+).html$ index.php?page=$2&rlVareables=$3$4&listing_id=$5 [QSA,L]
RewriteRule ^([^/]+)(/?(.{2,}))?-l?([0-9]+).html$ index.php?page=$1&rlVareables=$3&listing_id=$4 [QSA,L]

# wildcard request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} ^\/
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteCond %{HTTP_HOST} \.{2,} [NC] # 1 is localhost usage, 2 is global usage
RewriteCond %{HTTP_HOST} ^([^\.]+)\..+\.+ [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+) [NC]
RewriteRule (.*) index.php?page=%1&wildcard&rlVareables=$1 [QSA,L]

# account request (sub-directory)
RewriteRule ^((\w{2})/)?([\w-_]{3,})$ index.php?page=$3&lang=$2&account_request [QSA,L]

# define single pages
RewriteRule ^([^//]+)/?(^/*)?.html$ index.php?page=$1 [QSA,L]

# define other pages
RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.html|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]

RewriteRule sitemap.xml$ plugins/sitemap/sitemap.php [QSA,L]

Jenő Kocsi
July 10, 2021, 01:54 PM
This is a good file. The other is bad

Eydalvur Carlsson
July 10, 2021, 01:57 PM
Ok, do I just delete the bad one?

Jenő Kocsi
July 10, 2021, 01:59 PM
Yes. The wrong file must be deleted.

Eydalvur Carlsson
July 10, 2021, 02:00 PM
Should the good file be renamed to "htaccess"?

Jenő Kocsi
July 10, 2021, 02:02 PM
Yes. It must be named .htaccess

Joe Can
July 10, 2021, 02:02 PM
download and save the bad file just in case.

Eydalvur Carlsson
July 10, 2021, 02:05 PM
will try that. Could I also try to upload the file from to update patch from the flynax site?

Eydalvur Carlsson
July 10, 2021, 02:08 PM
Now this message is on the site.

This page isn’t working
www.yacht-boats.com is currently unable to handle this request.
HTTP ERROR 500

Jenő Kocsi
July 10, 2021, 02:16 PM
Did you put the .htaccess file in the main directory of the website?

A question. Was version 4.8.2 a completely new installation or just an upgrade? If an update was made, was everything done as described?

Eydalvur Carlsson
July 10, 2021, 02:33 PM
No updates have been made. So this is version 4.8.0. I have placed the file in public_html

Jenő Kocsi
July 10, 2021, 02:35 PM
Then you need the .htaccess file for version 4.8.0.

Eydalvur Carlsson
July 10, 2021, 02:39 PM
Then just upload it to the public_html directory?

Jenő Kocsi
July 10, 2021, 02:42 PM
Yes. Upload the original .htaccess file for 4.8.0.

Eydalvur Carlsson
July 10, 2021, 02:43 PM
Ill give that a try

Joe Can
July 10, 2021, 04:04 PM
Why not update to 4.8.2?

All updates are free here at Flynax

Jenő Kocsi
July 10, 2021, 04:11 PM
The problem is that I don't think he did something right or put up a good .htaccess file, because I've seen his page inaccessible ever since. I can even suggest renaming the .htaccess file smoothly to htaccess.txt and if that works then htaccess is the fault. And yes I would upgrade to 4.8.2 in its place.

Joe Can
July 10, 2021, 04:14 PM
Eydalvur,

Consider updating to the newest version.

If 4.8.2 has bugs, 4.8.0 must have many more.

Joe Can
July 10, 2021, 04:21 PM
Also, just a thought.

No issues just happen all by themselves.
Something must have changed.
If you did not change anything, your hosting company did.
Contact your hosting company and ask them if they just updated, upgraded, or changed something recently.