整了台机子,搭建 NAS,其中 nextcloud 卡在 lnmp 的配置上
centos 8 全套 dnf 安装
输入 ip,页面就是 File not found.
参考了搜索结果,感觉没问题啊
#定义 Nginx 运行的用户和用户组
user nginx nginx;
#nginx 进程数,建议设置为等于 CPU 总核心数
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
# 进程 Pid 文件
#pid /var/run/nginx/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
root /var/www/nextcloud;
index index.html index.htm;
charset utf-8;
#access_log logs/host.access.log main;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
centos 8 全套 dnf 安装
输入 ip,页面就是 File not found.
参考了搜索结果,感觉没问题啊
#定义 Nginx 运行的用户和用户组
user nginx nginx;
#nginx 进程数,建议设置为等于 CPU 总核心数
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
# 进程 Pid 文件
#pid /var/run/nginx/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
root /var/www/nextcloud;
index index.html index.htm;
charset utf-8;
#access_log logs/host.access.log main;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}