Использование веб-сервера nginx и php. nginx работает, я вижу «Добро пожаловать в nginx!» но я получаю сообщение «отказано в доступе» при попытке получить доступ к странице php. Я также установил php-fastcgi.
Использование веб-сервера nginx и php. nginx работает, я вижу «Добро пожаловать в nginx!» но я получаю сообщение «отказано в доступе» при попытке получить доступ к странице php. Я также установил php-fastcgi.
Вот моя конфигурация nginx по умолчанию:
[code]# redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; }
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root /usr/share/nginx/html; fastcgi_index index.php; fastcgi_pass unix:/var/run/php5-fpm.sock; include fastcgi_params; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; }
# deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } [/code]
Я активировал security.limit_extensions = .php .php3 .php4 .php5 .html и прослушиваю = /var/run/php5-fpm.sock
code> в /etc/php-fpm.d/www.conf и cgi.fix_pathinfo = 0 в /etc/php5/fpm/php.ini
Когда я пытаюсь сканировать IP-адрес, всегда выдает одну и ту же ошибку (Ошибка: доступ запрещен (403 запрещен))
def getShodan(ip):
print( -------Shodan------- )
try:
api = shodan.Shodan( )
info = api.host(ip)
return (
IP: {}
HOSTNAMES: {}...
Я настраиваю веб -сайт с Nginx, и я сталкиваюсь с следующей ошибкой в журналах:
2025/02/17 18:36:50 16694#16694: *5 stat() /var/www/frontend/public/index.html failed (13: Permission denied), client: 91.245.117.113, server: *ip*, request: GET /...