Welcome! Log In Create A New Profile

Advanced

How can I put content on an external disk? autoindex

Posted by Eloy 
How can I put content on an external disk? autoindex
July 30, 2019 12:42PM
Hello, Im Eloy, i have a server on nginx, this is my virtual server

server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/html;

index index.html index.php;

server_name _;

location /data/ {
autoindex on;

}

# This option is important for using PHP.
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
}
}


My configuration of server

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:1ccc;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:1ccc;
# protocol imap;
# proxy on;
# }
#}

Me he dado cuenta que yo solo tengo 768 worker conecctions y que el tiene como 1024, luego ya no

Luego tiene esto

server {
listen 80;
server_name localhost;
root html;

access_log logs/host.access.log main;

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}

}

}




I tried put this chown -R www-data:www-data /media/odroid/Maxtor/data/

chown -R www-data:www-data /usr/local/nginx/html/

service nginx destroy && service nginx start


But it has not taken effect, and I still have no permissions, even putting root.


I just want to leave the data folder on an external hard drive.

Since it is currently inside the html folder.

Thank you my web page is very old www.eloy.mooo.com
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 319
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready