nginx 에서 ~ tilde userdir 설정하기
페이지 정보
![profile_image](/img/no_profile.gif)
본문
# 참고
https://www.server-world.info/en/note?os=Ubuntu_20.04&p=nginx&f=4
```
root@www:~# vi /etc/nginx/sites-available/default
# add into [server] section
server {
.....
.....
location ~ ^/~(.+?)(/.*)?$ {
alias /home/$1/public_html$2;
index index.html index.htm;
autoindex on;
}
root@www:~# systemctl restart nginx
```
https://www.server-world.info/en/note?os=Ubuntu_20.04&p=nginx&f=4
```
root@www:~# vi /etc/nginx/sites-available/default
# add into [server] section
server {
.....
.....
location ~ ^/~(.+?)(/.*)?$ {
alias /home/$1/public_html$2;
index index.html index.htm;
autoindex on;
}
root@www:~# systemctl restart nginx
```
추천0
댓글목록
등록된 댓글이 없습니다.