sudden 505 error getting to my website on linux apache php - linux

suddenly i am getting this error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster#kibakibi.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.
and in apache error logs
[Fri Jan 19 12:42:15.226845 2018] [core:error] [pid 19115] [client 5.255.250.144:60384] End of script output before headers: index.php
[Fri Jan 19 12:42:17.217114 2018] [:error] [pid 19098] [client 5.188.10.11:51242] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:17.217148 2018] [core:error] [pid 19098] [client 5.188.10.11:51242] End of script output before headers: index.php
[Fri Jan 19 12:42:17.221895 2018] [:error] [pid 19098] [client 5.188.10.11:51242] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:17.221921 2018] [core:error] [pid 19098] [client 5.188.10.11:51242] End of script output before headers: index.php
[Fri Jan 19 12:42:20.958247 2018] [:error] [pid 19113] [client 54.36.148.28:59462] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:20.958275 2018] [core:error] [pid 19113] [client 54.36.148.28:59462] End of script output before headers: index.php
[Fri Jan 19 12:42:20.963483 2018] [:error] [pid 19113] [client 54.36.148.28:59462] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:20.963510 2018] [core:error] [pid 19113] [client 54.36.148.28:59462] End of script output before headers: index.php
[Fri Jan 19 12:42:21.772834 2018] [:error] [pid 19089] [client 66.249.66.21:41503] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:21.772862 2018] [core:error] [pid 19089] [client 66.249.66.21:41503] End of script output before headers: index.php
[Fri Jan 19 12:42:21.777434 2018] [:error] [pid 19089] [client 66.249.66.21:41503] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:21.777458 2018] [core:error] [pid 19089] [client 66.249.66.21:41503] End of script output before headers: index.php
[Fri Jan 19 12:42:21.911961 2018] [:error] [pid 19093] [client 84.201.133.27:54553] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:21.911994 2018] [core:error] [pid 19093] [client 84.201.133.27:54553] End of script output before headers: index.php
[Fri Jan 19 12:42:21.917152 2018] [:error] [pid 19093] [client 84.201.133.27:54553] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:21.917178 2018] [core:error] [pid 19093] [client 84.201.133.27:54553] End of script output before headers: index.php
[Fri Jan 19 12:42:21.974311 2018] [:error] [pid 19090] [client 5.188.10.11:53661] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:21.974334 2018] [core:error] [pid 19090] [client 5.188.10.11:53661] End of script output before headers: index.php
[Fri Jan 19 12:42:21.979110 2018] [:error] [pid 19090] [client 5.188.10.11:53661] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:21.979133 2018] [core:error] [pid 19090] [client 5.188.10.11:53661] End of script output before headers: index.php
[Fri Jan 19 12:42:22.944860 2018] [:error] [pid 19115] [client 54.36.149.63:42200] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:22.944888 2018] [core:error] [pid 19115] [client 54.36.149.63:42200] End of script output before headers: index.php
[Fri Jan 19 12:42:22.949539 2018] [:error] [pid 19115] [client 54.36.149.63:42200] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:22.949562 2018] [core:error] [pid 19115] [client 54.36.149.63:42200] End of script output before headers: index.php
[Fri Jan 19 12:42:23.190276 2018] [:error] [pid 19091] [client 100.43.81.113:55308] EasyApache PHP config file not found: /php.conf.yaml
[Fri Jan 19 12:42:23.190302 2018] [core:error] [pid 19091] [client 100.43.81.113:55308] End of script output before headers: index.php
[Fri Jan 19 12:42:23.194975 2018] [:error] [pid 19091] [client 100.43

I just rebuild the easy apache php settings and everything started working again.
(if you are on local just restart the apache if it does not work reinstall the apache and php services).

Related

How to install nltk on an Amazon EC2 instance?

I am trying to install nltk on an Amazon EC2 instance using pip and virtual environment. nltk is listed in the requirements.txt file that pip uses. I also want to download punkt using the nltk.download('punkt') option.
Here's what my makefile looks like:
INSTANCE_NAME=toolsapp
ENV=env
LOAD_ENV=source $(ENV)/bin/activate
VIRTUALENV_BIN:=$(shell which virtualenv || echo /usr/local/bin/virtualenv )
EB_BIN:=$(shell $(LOAD_ENV) && which eb || echo /usr/local/bin/eb )
AWS_BIN:=$(shell $(LOAD_ENV) && which aws || echo /usr/local/bin/aws )
default: dev
.PHONY: default
# Ensure virtualenv is installed
$(VIRTUALENV_BIN):
pip3 install virtualenv
# Create a virtualenv folder called env/ and install dependencies
$(ENV): $(VIRTUALENV_BIN)
virtualenv -p python3 $(ENV)
$(LOAD_ENV) && pip install --upgrade pip && pip install -r requirements.txt
But this is the error I get when I try to run the webapp:
[Tue Jul 24 14:46:13.798460 2018] [:error] [pid 22801] model type: 9
[Tue Jul 24 14:46:13.801193 2018] [:error] [pid 22801] Traceback (most recent call last):
[Tue Jul 24 14:46:13.801227 2018] [:error] [pid 22801] File "/opt/python/run/venv/local/lib/python3.6/site-packages/sumy/nlp/tokenizers.py", line 79, in _get_sentence_tokenizer
[Tue Jul 24 14:46:13.801232 2018] [:error] [pid 22801] return nltk.data.load(path)
[Tue Jul 24 14:46:13.801239 2018] [:error] [pid 22801] File "/opt/python/run/venv/local/lib/python3.6/site-packages/nltk/data.py", line 836, in load
[Tue Jul 24 14:46:13.801242 2018] [:error] [pid 22801] opened_resource = _open(resource_url)
[Tue Jul 24 14:46:13.801247 2018] [:error] [pid 22801] File "/opt/python/run/venv/local/lib/python3.6/site-packages/nltk/data.py", line 954, in _open
[Tue Jul 24 14:46:13.801251 2018] [:error] [pid 22801] return find(path_, path + ['']).open()
[Tue Jul 24 14:46:13.801255 2018] [:error] [pid 22801] File "/opt/python/run/venv/local/lib/python3.6/site-packages/nltk/data.py", line 675, in find
[Tue Jul 24 14:46:13.801259 2018] [:error] [pid 22801] raise LookupError(resource_not_found)
[Tue Jul 24 14:46:13.801274 2018] [:error] [pid 22801] LookupError:
[Tue Jul 24 14:46:13.801278 2018] [:error] [pid 22801] **********************************************************************
[Tue Jul 24 14:46:13.801280 2018] [:error] [pid 22801] Resource \x1b[93mpunkt\x1b[0m not found.
[Tue Jul 24 14:46:13.801283 2018] [:error] [pid 22801] Please use the NLTK Downloader to obtain the resource:
[Tue Jul 24 14:46:13.801285 2018] [:error] [pid 22801]
[Tue Jul 24 14:46:13.801288 2018] [:error] [pid 22801] \x1b[31m>>> import nltk
[Tue Jul 24 14:46:13.801299 2018] [:error] [pid 22801] >>> nltk.download('punkt')
[Tue Jul 24 14:46:13.801301 2018] [:error] [pid 22801] \x1b[0m
[Tue Jul 24 14:46:13.801303 2018] [:error] [pid 22801] Searched in:
[Tue Jul 24 14:46:13.801305 2018] [:error] [pid 22801] - '/home/wsgi/nltk_data'
[Tue Jul 24 14:46:13.801307 2018] [:error] [pid 22801] - '/usr/share/nltk_data'
[Tue Jul 24 14:46:13.801310 2018] [:error] [pid 22801] - '/usr/local/share/nltk_data'
[Tue Jul 24 14:46:13.801312 2018] [:error] [pid 22801] - '/usr/lib/nltk_data'
[Tue Jul 24 14:46:13.801314 2018] [:error] [pid 22801] - '/usr/local/lib/nltk_data'
[Tue Jul 24 14:46:13.801316 2018] [:error] [pid 22801] - '/opt/python/run/venv/nltk_data'
[Tue Jul 24 14:46:13.801318 2018] [:error] [pid 22801] - '/opt/python/run/venv/share/nltk_data'
[Tue Jul 24 14:46:13.801320 2018] [:error] [pid 22801] - '/opt/python/run/venv/lib/nltk_data'
[Tue Jul 24 14:46:13.801322 2018] [:error] [pid 22801] - ''
[Tue Jul 24 14:46:13.801325 2018] [:error] [pid 22801] **********************************************************************
[Tue Jul 24 14:46:13.801327 2018] [:error] [pid 22801]
[Tue Jul 24 14:46:13.801342 2018] [:error] [pid 22801]
[Tue Jul 24 14:46:13.801345 2018] [:error] [pid 22801] During handling of the above exception, another exception occurred:
[Tue Jul 24 14:46:13.801348 2018] [:error] [pid 22801]
[Tue Jul 24 14:46:13.801352 2018] [:error] [pid 22801] Traceback (most recent call last):
[Tue Jul 24 14:46:13.801369 2018] [:error] [pid 22801] File "/opt/python/current/app/summarization.py", line 40, in reform
[Tue Jul 24 14:46:13.801372 2018] [:error] [pid 22801] parser = HtmlParser.from_url(inputFile, Tokenizer("english"))
[Tue Jul 24 14:46:13.801377 2018] [:error] [pid 22801] File "/opt/python/run/venv/local/lib/python3.6/site-packages/sumy/nlp/tokenizers.py", line 67, in __init__
[Tue Jul 24 14:46:13.801380 2018] [:error] [pid 22801] self._sentence_tokenizer = self._get_sentence_tokenizer(tokenizer_language)
[Tue Jul 24 14:46:13.801385 2018] [:error] [pid 22801] File "/opt/python/run/venv/local/lib/python3.6/site-packages/sumy/nlp/tokenizers.py", line 82, in _get_sentence_tokenizer
[Tue Jul 24 14:46:13.801388 2018] [:error] [pid 22801] "NLTK tokenizers are missing. Download them by following command: "
[Tue Jul 24 14:46:13.801397 2018] [:error] [pid 22801] LookupError: NLTK tokenizers are missing. Download them by following command: python -c "import nltk; nltk.download('punkt')"
[Tue Jul 24 14:46:13.801414 2018] [:error] [pid 22801] unable to read https://webapp-input.s3.amazonaws.com/43629be5a07a43029f359abd1340ad08.input.txt?AWSAccessKeyId=ASIAI4UVLLOHEUNNKWNQ&Signature=NBbRoAhFB5mP3SNi3jR6rDcz8LY%3D&x-amz-security-token=FQoDYXdzEHgaDKt%2FFOhHU4UQgQLgdCK3A3amyJ9mziqpLJ01DR5yYqszDzAfi8e9B9Uj1xw9pJw4yDqyF5KFtul7D7o6Xm2qX%2FQvSb9tbnMoW2r8Pur%2FbhlJnhfKFUriT6ggk0THgAgXQWQ8pDOIIMOjn7XZLtFvTfWttukS40VC17geWmEod%2FsO9IZh3LyhN46V%2FdDQo21YZfZFRoQbFHgTd823mnnTLwNoZs51B%2BluwOJ70U22P0K%2FdhzFGVEEGj%2FDiT1oC%2B1aGHQoK4h9JC45%2BqdetOoxZZsdc2z8hxFPQbTW59AT2L4PC2icjkzjJ9prhJvzU25iuZeYoO5tC3SZ1fpNtJ5QCiBYdK1R1c0TRygeOGbev24j5qlTb5DLG4HknH47S6XBMKE%2Fs4EyEo2zNbu%2Fg7QhcebwjJ9%2FMcCpmbMV60H2cj2zMxk8gzV83E%2B19CODShcUQ7WSmNcXj5dyupEJ8SCHRBABBXhOZ8wzMLwU%2BgJy59DTzXl7ZZH1t0LzaOQLPSvjdqu%2FPNGhn1M7K4vVNti93hOCWsK0T3tltg9gfIjFF90gHSawS708WvcyUTmN%2BLD7m3cMJ9B9g9adISSU5d4NS7ohPyX%2FEQMom%2FDc2gU%3D&Expires=1532447173.
Add scripts to download the required models after installing nltk.
python3 -m nltk.downloader punkt
python3 -m nltk.downloader stopwords

.htaccess error in Codeigniter3

I have a website files in hosting account. And here is this .htaccess file in the root of directory
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php?/$1 [L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}
#AddHandler application/x-httpd-php56 .php .php5 .php4 .php3
Also, I added a new website folder 'nigaratakishizadeh.com' to the root and uploaded my CI files there. When I enter the website ( http://nigaratakishizadeh.com ), it gives me an error 500 Internal
500 - Internal Server Error This is a temporary server error. Please
try to reload the webpage later.
However, when I change nigaratakishizadeh.com folder's htaccess to RewriteEngine off, it opens the website. What is the problem?
Here is my .htaccess file in the nigaratakishizadeh.com directory:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php/$1 [L]
php_value upload_max_filesize 30M
Here is the server apache error logs:
[Sun Apr 29 08:16:29.548592 2018] [core:alert] [pid 33453] [client 181.224.135.93:39158] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:29.341526 2018] [core:alert] [pid 38466] [client 181.224.135.93:39098] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:27.622224 2018] [core:alert] [pid 43795] [client 181.224.135.93:38904] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:27.261333 2018] [core:alert] [pid 42837] [client 181.224.135.93:38864] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:23.581238 2018] [core:alert] [pid 38407] [client 181.224.135.93:38614] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:22.294281 2018] [core:alert] [pid 38523] [client 181.224.135.93:38538] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:20.994017 2018] [core:alert] [pid 38526] [client 181.224.135.93:38430] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:20.778064 2018] [core:alert] [pid 36546] [client 181.224.135.93:38378] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:20.778064 2018] [core:alert] [pid 38523] [client 181.224.135.93:38376] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:20.042254 2018] [core:alert] [pid 42837] [client 181.224.135.93:38276] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:20.009329 2018] [core:alert] [pid 33453] [client 181.224.135.93:38266] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:19.804285 2018] [core:alert] [pid 38528] [client 181.224.135.93:38236] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:19.742617 2018] [core:alert] [pid 38527] [client 181.224.135.93:38228] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:19.535860 2018] [core:alert] [pid 38526] [client 181.224.135.93:38124] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:19.178688 2018] [core:alert] [pid 38528] [client 181.224.135.93:38038] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:18.973287 2018] [core:alert] [pid 38466] [client 181.224.135.93:37990] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:18.383334 2018] [core:alert] [pid 38526] [client 181.224.135.93:37862] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:18.173713 2018] [core:alert] [pid 42837] [client 181.224.135.93:37826] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:06.847039 2018] [core:alert] [pid 38523] [client 181.224.135.93:35942] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:05.703058 2018] [core:alert] [pid 33453] [client 181.224.135.93:35858] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:05.101583 2018] [core:alert] [pid 38527] [client 181.224.135.93:35786] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:04.895922 2018] [core:alert] [pid 42837] [client 181.224.135.93:35756] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:04.391211 2018] [core:alert] [pid 38526] [client 181.224.135.93:35702] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:16:04.122189 2018] [core:alert] [pid 42837] [client 181.224.135.93:35648] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: http://nigaratakishizadeh.com/
[Sun Apr 29 08:16:03.218603 2018] [core:alert] [pid 38526] [client 181.224.135.93:35530] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:11:50.044065 2018] [core:alert] [pid 7912] [client 181.224.135.93:33050] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:48.010489 2018] [core:alert] [pid 7912] [client 181.224.135.93:60890] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:47.751755 2018] [core:alert] [pid 14231] [client 181.224.135.93:60852] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:46.422532 2018] [core:alert] [pid 2990] [client 181.224.135.93:60692] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:19.255974 2018] [core:alert] [pid 12220] [client 181.224.135.93:56988] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:15.718812 2018] [core:alert] [pid 2522] [client 181.224.135.93:56666] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:15.490073 2018] [core:alert] [pid 12918] [client 181.224.135.93:56638] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:15.320300 2018] [core:alert] [pid 8370] [client 181.224.135.93:56608] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:14.989071 2018] [core:alert] [pid 12918] [client 181.224.135.93:56570] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:10.808651 2018] [core:alert] [pid 12918] [client 181.224.135.93:56064] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:10.426044 2018] [core:alert] [pid 12918] [client 181.224.135.93:56020] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:09.269472 2018] [core:alert] [pid 12220] [client 181.224.135.93:55938] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:08.937889 2018] [core:alert] [pid 2828] [client 181.224.135.93:55904] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:11:08.323260 2018] [core:alert] [pid 2522] [client 181.224.135.93:55872] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:10:33.954696 2018] [core:alert] [pid 56003] [client 181.224.135.93:53066] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:10:28.173501 2018] [core:alert] [pid 7912] [client 181.224.135.93:52686] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:10:27.670770 2018] [core:alert] [pid 2990] [client 181.224.135.93:52664] /home/javid020/public_html/nigaratakishizadeh.com/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Sun Apr 29 08:09:37.739238 2018] [core:alert] [pid 2990] [client 181.224.135.93:51750] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:34.847641 2018] [core:alert] [pid 2990] [client 181.224.135.93:51550] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:34.640236 2018] [core:alert] [pid 45433] [client 181.224.135.93:51530] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section, referer: https://www.wtf.az/courses
[Sun Apr 29 08:09:33.541211 2018] [core:alert] [pid 3110] [client 181.224.135.93:51446] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:33.321420 2018] [core:alert] [pid 50479] [client 181.224.135.93:51440] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section, referer: https://www.wtf.az/courses
[Sun Apr 29 08:09:33.124587 2018] [core:alert] [pid 2828] [client 181.224.135.93:51426] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:32.919041 2018] [core:alert] [pid 7834] [client 181.224.135.93:51408] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section, referer: https://www.wtf.az/courses
[Sun Apr 29 08:09:32.820198 2018] [core:alert] [pid 3110] [client 181.224.135.93:51402] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:13.463839 2018] [core:alert] [pid 45433] [client 181.224.135.93:49724] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:13.320793 2018] [core:alert] [pid 3110] [client 181.224.135.93:49716] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:13.258574 2018] [core:alert] [pid 2990] [client 181.224.135.93:49710] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section, referer: https://www.wtf.az/courses
[Sun Apr 29 08:09:12.506714 2018] [core:alert] [pid 2990] [client 181.224.135.93:49654] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section, referer: https://www.wtf.az/courses
[Sun Apr 29 08:09:11.796429 2018] [core:alert] [pid 2828] [client 181.224.135.93:49580] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
[Sun Apr 29 08:09:10.569661 2018] [core:alert] [pid 39620] [client 181.224.135.93:49444] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section, referer: https://www.wtf.az/courses
[Sun Apr 29 08:09:09.945440 2018] [core:alert] [pid 39620] [client 181.224.135.93:49404] /home/javid020/public_html/.htaccess: </IfModule without matching <IfModule section
There can be different reason behind it (like you have not loaded rewrite_module). Check your server's apache error log for detail about this error & take action accordingly.
Then you can add some condition with code like
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php?/$1 [L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}
#AddHandler application/x-httpd-php56 .php .php5 .php4 .php3
</IfModule >
Every Line in your .htaccess file is correct.
you are getting 500 - Internal server error because you do not have permission to set these values by .htaccess.
You have to contact your web server providers and ask to set AllowOverride Options for your host or to put these lines in their virtual host configuration file.
see the Apache AllowOverride directive

Apache is not running on CentOS 7 Server

I'm running a Bitrix server over a CentOS Linux 7.4.1708 machine and I can't manage to get Apache work properly. I've tried restarting the Apache service but it didn't work.
I've checked the system logs via Webadmin and it shows the following:
[Mon Mar 05 03:33:12.118466 2018] [mpm_prefork:notice] [pid 1351]
AH00163: Apache/2.4.6 (CentOS) PHP/7.0.26 OpenSSL/1.0.2k-fips
configured -- resuming normal operations
[Mon Mar 05 03:33:12.118482 2018] [core:notice] [pid 1351] AH00094:
Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Mar 05 11:19:46.641040 2018] [mpm_prefork:notice] [pid 1351]
AH00170: caught SIGWINCH, shutting down gracefully
[Mon Mar 05 11:20:15.021546 2018] [suexec:notice] [pid 1360] AH01232:
suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 05 11:20:15.107376 2018] [so:warn] [pid 1360] AH01574: module
socache_shmcb_module is already loaded, skipping
[Mon Mar 05 11:20:17.068083 2018] [mpm_prefork:notice] [pid 1360]
AH00163: Apache/2.4.6 (CentOS) PHP/7.0.26 OpenSSL/1.0.2k-fips
configured -- resuming normal operations
[Mon Mar 05 11:20:17.068138 2018] [core:notice] [pid 1360] AH00094:
Command line: '/usr/sbin/httpd -f /etc/httpd/conf/httpd-scale.conf -D
FOREGROUND'
[Mon Mar 05 11:36:43.537842 2018] [mpm_prefork:notice] [pid 1360]
AH00170: caught SIGWINCH, shutting down gracefully
[Mon Mar 05 11:37:13.314311 2018] [suexec:notice] [pid 1351] AH01232:
suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 05 11:37:13.351957 2018] [so:warn] [pid 1351] AH01574: module
socache_shmcb_module is already loaded, skipping
[Mon Mar 05 11:37:15.361335 2018] [mpm_prefork:notice] [pid 1351]
AH00163: Apache/2.4.6 (CentOS) PHP/7.0.26 OpenSSL/1.0.2k-fips
configured -- resuming normal operations
[Mon Mar 05 11:37:15.361360 2018] [core:notice] [pid 1351] AH00094:
Command line: '/usr/sbin/httpd -f /etc/httpd/conf/httpd-scale.conf -D
FOREGROUND'
[Mon Mar 05 11:49:01.192086 2018] [mpm_prefork:error] [pid 1351]
AH00161: server reached MaxRequestWorkers setting, consider raising
the MaxRequestWorkers setting
[Mon Mar 05 12:01:13.778293 2018] [mpm_prefork:notice] [pid 1351]
AH00170: caught SIGWINCH, shutting down gracefully
[Mon Mar 05 12:01:43.297586 2018] [suexec:notice] [pid 1383] AH01232:
suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 05 12:01:43.371237 2018] [so:warn] [pid 1383] AH01574: module
socache_shmcb_module is already loaded, skipping
[Mon Mar 05 12:01:44.932973 2018] [mpm_prefork:notice] [pid 1383]
AH00163: Apache/2.4.6 (CentOS) PHP/7.0.26 OpenSSL/1.0.2k-fips
configured -- resuming normal operations
[Mon Mar 05 12:01:44.933001 2018] [core:notice] [pid 1383] AH00094:
Command line: '/usr/sbin/httpd -f /etc/httpd/conf/httpd-scale.conf -D
FOREGROUND'
I don't have any clue on what the problem might be. Apache used to work fine until we installed a Bitrix update on the server.
Any sort of help or comment about this would be much appreciated.
Did you increase the MaxRequestWorkers setting as suggested in the logs?
Find the corresponding file:
grep -Ril MaxRequestWorkers /etc/httpd/
On CentOS usually it is /etc/httpd/conf/httpd.conf. Open the file, increase the value of MaxRequestWorkers and restart the web server for the changes to take effect:
systemctl restart httpd

problems by User URL - htacces

this is so that I get an error when I work with preatashop, and I get a 404 error and I can not possibly see the error.
error on my hosting are here:
[Tue Mar 18 16:29:31.837809 2014] [:error] [pid 381031] [client 188.181.88.9:42136]
SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/index.php
[Tue Mar 18 16:23:45.421181 2014] [:error] [pid 375394] [client 183.81.54.21:40210] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/admin123/index.php?controller=AdminModules&token=52745cf84f136fef00d2738ad3be8887&configure=blockadvfooter&tab_module=others&module_name=blockadvfooter
[Tue Mar 18 16:22:34.397894 2014] [:error] [pid 373007] [client 183.81.54.21:39642] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/admin123/index.php?controller=AdminModules&token=52745cf84f136fef00d2738ad3be8887&configure=blockadvfooter&tab_module=others&module_name=blockadvfooter
[Tue Mar 18 16:20:13.975016 2014] [:error] [pid 368791] [client 188.181.88.9:38718] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/admin123/index.php?controller=AdminModules&token=c743f4f33c0588a21fa3880e5772bf6c&configure=blockadvfooter&tab_module=others&module_name=blockadvfooter
[Tue Mar 18 16:19:35.680863 2014] [:error] [pid 368791] [client 183.81.54.21:38415] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/index.php
[Tue Mar 18 16:19:32.283604 2014] [:error] [pid 367335] [client 183.81.54.21:38408] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:18:58.956017 2014] [:error] [pid 371329] [client 183.81.54.21:38290] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/admin123/index.php?controller=AdminModules&token=52745cf84f136fef00d2738ad3be8887&configure=blockadvfooter&tab_module=others&module_name=blockadvfooter
[Tue Mar 18 16:18:54.456715 2014] [:error] [pid 369337] [client 188.181.88.9:38293] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/index.php
[Tue Mar 18 16:18:33.148207 2014] [:error] [pid 369336] [client 183.81.54.21:38191] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/index.php
[Tue Mar 18 16:18:24.373591 2014] [:error] [pid 359359] [client 183.81.54.21:38139] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/index.php
[Tue Mar 18 16:18:18.820409 2014] [:error] [pid 368791] [client 183.81.54.21:38121] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:17:52.208217 2014] [:error] [pid 369336] [client 183.81.54.21:37992] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group, referer: http://www.shop-bo.dk/index.php
[Tue Mar 18 16:17:45.449577 2014] [:error] [pid 368791] [client 183.81.54.21:37955] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:17:32.821418 2014] [:error] [pid 369336] [client 183.81.54.21:37852] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:16:23.042423 2014] [:error] [pid 367335] [client 183.81.54.21:37511] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:15:57.751759 2014] [:error] [pid 367335] [client 183.81.54.21:37445] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:15:49.707305 2014] [:error] [pid 361467] [client 188.181.88.9:37419] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
[Tue Mar 18 16:15:38.862260 2014] [:error] [pid 369137] [client 183.81.54.21:37391] SoftException in Application.cpp:601: Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
I have set to be user-friendly URL - htacces
my .htaccess its here:
# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine on
RewriteCond %{HTTP_HOST} ^demo4leotheme.com$
RewriteRule . - [E=REWRITEBASE:/prestashop/leo_mobile/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demo4leotheme.com$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /prestashop/leo_mobile/index.php?controller=404
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
Your error.log shows something important:
Directory "/home/jesperbo/public_html/shop-bo.dk/modules" is writeable by group
Fix this error by changing your permissions using this chmod command:
chmod g-w /home/jesperbo/public_html/shop-bo.dk/modules

Making nice Urls in Yii

I red a lot of tuttorials, but all lead me to the same error - Error 500 - Either the server is overloaded or there was an error in a CGI script.
I'm using xampp on Windows and cofigured httpd.conf like this
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
changed in yii main.php
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'caseSensitive'=>false,
'rules'=>array(
'' => 'site/index',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
and added .htaccess in root folder (the same level where protected folder)
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteBase /tests/
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
But no matter what I write in .htaccess, I get this error. When I commented all out, links from yii are generated ok (without index.php), but then I have 404 error, because of wrong server configuration.
EDIT:
And error.log last few records:
[Wed Nov 27 11:32:31.100063 2013] [core:alert] [pid 9520:tid 1572] [client ::1:58620] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 11:32:31.372163 2013] [core:alert] [pid 9520:tid 1572] [client ::1:58621] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 11:32:34.674379 2013] [core:alert] [pid 9520:tid 1572] [client ::1:58622] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 11:32:36.587084 2013] [core:alert] [pid 9520:tid 1572] [client ::1:58623] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 11:32:54.899832 2013] [core:alert] [pid 9520:tid 1572] [client ::1:58624] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 11:54:14.056192 2013] [core:alert] [pid 9520:tid 1572] [client ::1:59297] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 11:54:14.687425 2013] [core:alert] [pid 9520:tid 1572] [client ::1:59298] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 15:53:27.459885 2013] [ssl:warn] [pid 11320:tid 308] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Nov 27 15:53:27.525911 2013] [core:warn] [pid 11320:tid 308] AH00098: pid file C:/Users/kristineg/xamps/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Nov 27 15:53:27.588934 2013] [ssl:warn] [pid 11320:tid 308] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Nov 27 15:53:27.625947 2013] [mpm_winnt:notice] [pid 11320:tid 308] AH00455: Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.1 configured -- resuming normal operations
[Wed Nov 27 15:53:27.625947 2013] [mpm_winnt:notice] [pid 11320:tid 308] AH00456: Server built: Feb 23 2013 12:42:00
[Wed Nov 27 15:53:27.625947 2013] [core:notice] [pid 11320:tid 308] AH00094: Command line: 'c:\users\kristineg\xamps\apache\bin\httpd.exe -d C:/Users/kristineg/xamps/apache'
[Wed Nov 27 15:53:27.627948 2013] [mpm_winnt:notice] [pid 11320:tid 308] AH00418: Parent: Created child process 4472
[Wed Nov 27 15:53:27.998083 2013] [ssl:warn] [pid 4472:tid 336] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Nov 27 15:53:28.143138 2013] [ssl:warn] [pid 4472:tid 336] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Nov 27 15:53:28.186154 2013] [mpm_winnt:notice] [pid 4472:tid 336] AH00354: Child: Starting 150 worker threads.
[Wed Nov 27 15:53:38.827074 2013] [core:alert] [pid 4472:tid 1640] [client ::1:61797] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 15:53:39.614364 2013] [core:alert] [pid 4472:tid 1652] [client ::1:61796] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 15:53:39.958491 2013] [core:alert] [pid 4472:tid 1640] [client ::1:61798] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 15:53:40.295616 2013] [core:alert] [pid 4472:tid 1652] [client ::1:61799] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
[Wed Nov 27 16:32:32.894114 2013] [core:alert] [pid 4472:tid 1640] [client ::1:62407] C:/Users/kristineg/xamps/htdocs/xampp/tests/.htaccess: Options not allowed here
I think you don't have the mode_rewrite module loaded in your server's main config. For starters, modify your .htaccess so it looks like this:
IndexIgnore */*
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /tests/
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
If things change for the better (i.e. no 500-errors), see your main httpd.conf and look for a line that starts like this:
#LoadModule rewrite_module ...
Uncomment that line by removing the leading # and restart the server process.
As for the "Options not allowed here" error, see this answer.

Resources