Author Topic: .htaccess - 500 Internal Server Error  (Read 422 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
.htaccess - 500 Internal Server Error
« on: November 26, 2018, 06:35:06 PM »
Hello,
My Webserver is Apache & Nginx Reverse Proxy and my server is CentOS 6.10 (latest), my CWP version is also the latest version!
In addition to setting the maximum upload file size using php.ini and .user.ini, I try to install them via .htaccess. But I get the error "500 Internal Server Error".
I have read the documentation on the CWP wiki page, they said: "DSO - PHP Handler for CWP", "DSO also referred to as mod_php" (Wiki). So I edited my .htaccess file as follows:
Code: [Select]
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options -Indexes
Options All -Indexes
RewriteEngine On
RewriteBase /
</IfModule>
<IfModule mod_php5.c>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_flag log_errors Off
   php_value allow_url_fopen On
   php_value max_execution_time 60
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 2048M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path '/tmp'
   php_value upload_max_filesize 50M
   php_value post_max_size 50M
   php_value max_file_uploads 20
   php_flag zlib.output_compression Off
   php_value date.timezone 'Asia/Ho_Chi_Minh'
</IfModule>
<IfModule mod_php7.c>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_flag log_errors Off
   php_value allow_url_fopen On
   php_value max_execution_time 60
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 2048M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path '/tmp'
   php_value upload_max_filesize 50M
   php_value post_max_size 50M
   php_value max_file_uploads 20
   php_flag zlib.output_compression Off
   php_value date.timezone 'Asia/Ho_Chi_Minh'
</IfModule>
<IfModule mime_module>
   AddType application/x-httpd-ea-php56 .php .php5 .phtml
   AddHandler application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
I checked the log in my apache directory and found the file is suphp.log, so I tried changing it to suphp as follows:
Code: [Select]
<IfModule mod_suphp.c>
   php_flag asp_tags Off
   php_flag display_errors Off
   php_flag log_errors Off
   php_value allow_url_fopen On
   php_value max_execution_time 60
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 2048M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path '/tmp'
   php_value upload_max_filesize 50M
   php_value post_max_size 50M
   php_value max_file_uploads 20
   php_flag zlib.output_compression Off
   php_value date.timezone 'Asia/Ho_Chi_Minh'
   AddType application/x-httpd-ea-php56 .php .php5 .phtml
   AddHandler application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
And they all return the same error (500 Internal Server Error)!
Where was I wrong?
Please help me!
Thank you.