G
G
gemolo2016-11-29 14:47:59
linux
gemolo, 2016-11-29 14:47:59

Why is there a 500: mod_fcgid: can't init env request header error?

Hello everyone,
There is a site, when you try to access it from Yandex search results, an error 500 Internal Server Error is displayed
. In the logs, you can see this:

[Tue Nov 29 14:36:06.301966 2016] [fcgid:warn] [pid 2948] [client :59640] mod_fcgid: can't init env request header, referer: https://yandex.ru/clck/jsredir?from=yandex.ru%3Bsitesearch%3Bweb%3B%3B%2Fsite%2Fweb%2Fitem%2Ftitle%2Cpos%2Cp0%2Csource%2Cweb&text=%D1%81%D1%82%D1%80%D0%B0%D1%82%D0%B5%D0%B3%D0%B8%D1%8F%20%D1%8E%D1%80%D0%B8%D1%8F%20%D0%BA%D1%83%D0%B7%D0%B8%D0%BD%D0%B0&uuid=&state=p0xMUgUEWJtcZBIIioDH35SC_MTyxd4MhXjlnkyRLy6n6IuJbT5f9g&data=UlNrNmk5WktYejR0eWJFYk1LdmtxdmVBYThmNGxJS2tsaVl3YTlGMDJPYkZ4c2lpQjFUSS1sMDJvdTBYUXlYMmNkc3NrOUN5S1dFbEk3TW9zaU5pZHk5UnV2Z19MRVl0cUs1SlBKOVhYWVRmc0tIcXFmUm5EejZnMDBRQmpzOWZlWS1NUERDeG5JNA&b64e=2&sign=c3ea4a0a0d2f62e8b8e2e2f348f839da&keyno=0&cst=AiuY0DBWFJ5fN_r-AEszk9vikyRWIr3HV7pRChCE5O_JLlZA3XT0MFf8hyc_hXe9Yto3Wuctd_1GHU7Iw-hXPGeYtlympYmW77xmYXyjRIkgjqsjnxW2xaB-NpmN5r1VzBS4IJsub4SjxBTefcMThbSBs9cFxVR9fh-KDoGS1bJwtBCQQaUee0TcorkdYvSdpjtqItQk_1yhdJnn2zzt8r1SyScy9zQ7rtE5mpqKHSvyfmynRf2BHCM0gsXDR0QY86DH9e4JxHY4d1nOFX9M6-IFf71SHn6w3tmXcFLsHRMt3-XOncni43aeNUhb6Z3fAn-I4n98N_seWG7Mo-3wUI_9H_WaMFL7B2jCgHGqAkeeqLlgdktlzRhSUjgImA-CZOPk0AzozXfXW3gfaHJ4jLqmJX0lrXZgYN-_hyIzfmoO1ZBsgV5DmuPDWOZpt9WamdNh7Zb6NnRLYep1WzKL3SCsBA0yAU_QZGaSWg0rtOa45XcJdPFxnc9x4PwlDXqMMHi-0VAWviI&ref=orjY4mGPRjk5boDnW0uvloSXPXMALegbS65XgydstAStpUf8ra7FY7fc0A6H9gDWNEN1cWBsRsOrpLaBxwyMxNmAyKegyWsmdN2W-Jz1CHFkV_jUHsHrGWygAbyCh127xoTCiOoa4qGkazb6TNfiF6wNLg_mXsy_rMomimUARTZTQ6UceO2nKU46Tyk5Hx0O&l10n=ru
[Tue Nov 29 14:36:06.302000 2016] [fcgid:warn] [pid 2948] [client :59640] mod_fcgid: can't build begin or env request, referer: https://yandex.ru/clck/jsredir?from=yandex.ru%3Bsitesearch%3Bweb%3B%3B%2Fsite%2Fweb%2Fitem%2Ftitle%2Cpos%2Cp0%2Csource%2Cweb&text=%D1%81%D1%82%D1%80%D0%B0%D1%82%D0%B5%D0%B3%D0%B8%D1%8F%20%D1%8E%D1%80%D0%B8%D1%8F%20%D0%BA%D1%83%D0%B7%D0%B8%D0%BD%D0%B0&uuid=&state=p0xMUgUEWJtcZBIIioDH35SC_MTyxd4MhXjlnkyRLy6n6IuJbT5f9g&data=UlNrNmk5WktYejR0eWJFYk1LdmtxdmVBYThmNGxJS2tsaVl3YTlGMDJPYkZ4c2lpQjFUSS1sMDJvdTBYUXlYMmNkc3NrOUN5S1dFbEk3TW9zaU5pZHk5UnV2Z19MRVl0cUs1SlBKOVhYWVRmc0tIcXFmUm5EejZnMDBRQmpzOWZlWS1NUERDeG5JNA&b64e=2&sign=c3ea4a0a0d2f62e8b8e2e2f348f839da&keyno=0&cst=AiuY0DBWFJ5fN_r-AEszk9vikyRWIr3HV7pRChCE5O_JLlZA3XT0MFf8hyc_hXe9Yto3Wuctd_1GHU7Iw-hXPGeYtlympYmW77xmYXyjRIkgjqsjnxW2xaB-NpmN5r1VzBS4IJsub4SjxBTefcMThbSBs9cFxVR9fh-KDoGS1bJwtBCQQaUee0TcorkdYvSdpjtqItQk_1yhdJnn2zzt8r1SyScy9zQ7rtE5mpqKHSvyfmynRf2BHCM0gsXDR0QY86DH9e4JxHY4d1nOFX9M6-IFf71SHn6w3tmXcFLsHRMt3-XOncni43aeNUhb6Z3fAn-I4n98N_seWG7Mo-3wUI_9H_WaMFL7B2jCgHGqAkeeqLlgdktlzRhSUjgImA-CZOPk0AzozXfXW3gfaHJ4jLqmJX0lrXZgYN-_hyIzfmoO1ZBsgV5DmuPDWOZpt9WamdNh7Zb6NnRLYep1WzKL3SCsBA0yAU_QZGaSWg0rtOa45XcJdPFxnc9x4PwlDXqMMHi-0VAWviI&ref=orjY4mGPRjk5boDnW0uvloSXPXMALegbS65XgydstAStpUf8ra7FY7fc0A6H9gDWNEN1cWBsRsOrpLaBxwyMxNmAyKegyWsmdN2W-Jz1CHFkV_jUHsHrGWygAbyCh127xoTCiOoa4qGkazb6TNfiF6wNLg_mXsy_rMomimUARTZTQ6UceO2nKU46Tyk5Hx0O&l10n=ru

I suspect that this is due to a long referer.
Here is a curl request, which causes a 500 error:
curl 'http://premier.region35.ru/gazeta/np991/s27.html' \
-XGET \
-H 'Referer: https://yandex.ru/clck/jsredir?from=yandex.ru%3Bsitesearch%3Bweb%3B%3B%2Fsite%2Fweb%2Fitem%2Ftitle%2Cpos%2Cp0%2Csource%2Cweb&text=%D1%81%D1%82%D1%80%D0%B0%D1%82%D0%B5%D0%B3%D0%B8%D1%8F%20%D1%8E%D1%80%D0%B8%D1%8F%20%D0%BA%D1%83%D0%B7%D0%B8%D0%BD%D0%B0&uuid=&state=p0xMUgUEWJtcZBIIioDH35SC_MTyxd4MhXjlnkyRLy6n6IuJbT5f9g&data=UlNrNmk5WktYejR0eWJFYk1LdmtxdmVBYThmNGxJS2tsaVl3YTlGMDJPYkZ4c2lpQjFUSS1sMDJvdTBYUXlYMmNkc3NrOUN5S1dFbEk3TW9zaU5pZHk5UnV2Z19MRVl0cUs1SlBKOVhYWVRmc0tIcXFmUm5EejZnMDBRQmpzOWZlWS1NUERDeG5JNA&b64e=2&sign=c3ea4a0a0d2f62e8b8e2e2f348f839da&keyno=0&cst=AiuY0DBWFJ5fN_r-AEszk9vikyRWIr3HV7pRChCE5O_JLlZA3XT0MFf8hyc_hXe9Yto3Wuctd_1GHU7Iw-hXPGeYtlympYmW77xmYXyjRIkgjqsjnxW2xaB-NpmN5r1VzBS4IJsub4SjxBTefcMThbSBs9cFxVR9fh-KDoGS1bJwtBCQQaUee0TcorkdYvSdpjtqItQk_1yhdJnn2zzt8r1SyScy9zQ7rtE5mpqKHSvyfmynRf2BHCM0gsXDR0QY86DH9e4JxHY4d1nOFX9M6-IFf71SHn6w3tmXcFLsHRMt3-XOncni43aeNUhb6Z3fAn-I4n98N_seWG7Mo-3wUI_9H_WaMFL7B2jCgHGqAkeeqLlgdktlzRhSUjgImA-CZOPk0AzozXfXW3gfaHJ4jLqmJX0lrXZgYN-_hyIzfmoO1ZBsgV5DmuPDWOZpt9WamdNh7Zb6NnRLYep1WzKL3SCsBA0yAU_QZGaSWg0rtOa45XcJdPFxnc9x4PwlDXqMMHi-0VAWviI&ref=orjY4mGPRjk5boDnW0uvloSXPXMALegbS65XgydstAStpUf8ra7FY7fc0A6H9gDWNEN1cWBsRsOrpLaBxwyMxNmAyKegyWsmdN2W-Jz1CHFkV_jUHsHrGWygAbyCh127xoTCiOoa4qGkazb6TNfiF6wNLg_mXsy_rMomimUARTZTQ6UceO2nKU46Tyk5Hx0O&l10n=ru' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Cache-Control: max-age=0' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14'

Tell me, please, what can be done about this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question