/etc/nginx/sites-enabled/default 파일을 통해 우리가 돌리고자 하는 웹서버 설정을 변경할 수있습니다.
저는 이곳에서 다음과 같은 설정을 변경하였습니다.
Listen port: 접속 포트 수정
root: web페이지 root dir 수정
index 수정
php: 수정
ht: 수정
server {
#수정listen9000 default_server;
listen [::]:9000 default_server;
# SSL configuration## listen 443 ssl default_server;# listen [::]:443 ssl default_server;## Note: You should disable gzip for SSL traffic.# See: https://bugs.debian.org/773332## Read up on ssl_ciphers to ensure a secure configuration.# See: https://bugs.debian.org/765782## Self signed certs generated by the ssl-cert package# Don't use them in a production server!## include snippets/snakeoil.conf;#수정#root /var/www/html;root /home/pi/www;
#수정# Add index.php to the list if you are using PHPindex index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then# as directory, then fall back to displaying a 404.try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server#수정location~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# With php-cgi (or other tcp sockets):#fastcgi_pass 127.0.0.1:9900;
}
# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##수정location~ /\.ht {
deny all;
}
}
동작 테스트를 위해서 위에서 setting 한 루트폴더를 생성해 줍니다. 웹서버가 파일을 읽어갈 수있는 권한 세팅은 항상 필수 입니다. 기본계정인 www-data 계정이 해당 문서를 읽을 수 있도록 setting 해주시면됩니다.
Squid의 환경설정파일은 /etc/squid/squid.conf 에 위치해 있는데 이파일이 엄청나게 길고 내용이 많습니다. 모든 기능들을 활용하기보다 단순히 허가된 사용자만 프록시에 접속할수 있도록 하는 기능만 사용할예정이여서 기존 conf를 백업하고 다음과 같은 새파일을 만들어 줍니다
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwords
auth_param basic children 2
auth_param basic realm proxy
acl KnowUsers proxy_auth REQUIRED
http_access allow KnowUsers
http_access deny all
http_port 3128
이전에 Rclone를 사용하던 configuration을 그대로 사용하도록 하였습니다. 초기 설치 및 마운트는 다른 블로그들 참고 바랍니다. Raspberry pi에 Rclone Mount를 위해서는 두가지 스크립트가 필요합니다. 우선 특정 폴더에 다음 파일들을 생성해 줍니다. rclone config파일은 /home/pi/rclone/rclone.conf 파일로 저장해 두었습니다. 해당부분 변경하시면 됩니다.
plexdrive@.service
[Unit]Description=Rclone Mount Service %iDocumentation=man:rclone(1)After=network.target[Service]Type=simpleExecStartPre=/bin/mkdir -p %h/gdriveExecStart= \
rclone --config /home/pi/rclone/rclone.conf \
mount gdrive: /home/pi/gdrive \
--allow-non-empty \
--drive-skip-gdocs \
--log-level ERROR \
--log-file=/home/pi/rclone/rclone.log \
--umask 000ExecStop= \
fusermount -u %h/gdrive[Install]WantedBy=default.target
Uploaded by Notion2Tistory v1.1.0