nginx appears
403 Forbidden
nginx/1.10.3
you can sign in the html file. When it is forced to open index.php. It becomes a download.
html folder gives 777. It also indicates that the permissions are insufficient. All kinds of permissions have been given
errror.log
01:14:18 on 2018-04-28 [error] 730 directory index of 730: * 4 directory index of "/ var/www/html/" is forbidden, client: 192.168.2.103, server: _, request: "GET / HTTP/1.1", host: "192.168.2.105"
nginx.conf
user root;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
-sharp multi_accept on;
}
http {
-sharp-sharp
-sharp Basic Settings
-sharp-sharp
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
-sharp server_tokens off;
-sharp server_names_hash_bucket_size 64;
-sharp server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
-sharp-sharp
-sharp SSL Settings
-sharp-sharp
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; -sharp Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
-sharp-sharp
-sharp Logging Settings
-sharp-sharp
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
-sharp-sharp
-sharp Gzip Settings
-sharp-sharp
gzip on;
gzip_disable "msie6";
-sharp gzip_vary on;
-sharp gzip_proxied any;
-sharp gzip_comp_level 6;
-sharp gzip_buffers 16 8k;
-sharp gzip_http_version 1.1;
-sharp gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-sharp-sharp
-sharp Virtual Host Configs
-sharp-sharp
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
-sharpmail {
-sharp -sharp See sample authentication script at:
-sharp -sharp http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
-sharp
-sharp -sharp auth_http localhost/auth.php;
-sharp -sharp pop3_capabilities "TOP" "USER";
-sharp -sharp imap_capabilities "IMAP4rev1" "UIDPLUS";
-sharp
-sharp server {
-sharp listen localhost:110;
-sharp protocol pop3;
-sharp proxy on;
-sharp }
-sharp
-sharp server {
-sharp listen localhost:143;
-sharp protocol imap;
-sharp proxy on;
-sharp }
-sharp}
my.conf
server
{
listen 80;
server_name localhost;
index index.html index.php;
root /var/www/html/;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
{
expires 30d;
-sharp access_log off;
}
location ~ .*\.(js|css)?$
{
expires 15d;
-sharp access_log off;
}
access_log off;
}