Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ 설정 ] default.conf #82

Open
INAUGURATE-Ryong opened this issue Apr 5, 2024 · 0 comments
Open

[ 설정 ] default.conf #82

INAUGURATE-Ryong opened this issue Apr 5, 2024 · 0 comments

Comments

@INAUGURATE-Ryong
Copy link
Contributor

server {
    listen 80;
    server_name bpssystem.store www.bpssystem.store;


    # 로그 파일 위치 설정
    access_log /var/log/nginx/vue_app_access.log;
    error_log /var/log/nginx/vue_app_error.log;

    # 정적 파일과 index.html 서빙
    root /usr/share/nginx/html;
    index index.html;

    # 모든 요청을 Vue 앱으로 리다이렉트
    location / {
        try_files $uri $uri/ /index.html;
    }

    # API 요청 프록시
    location /api {
        proxy_pass http://localhost:8081;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
server {
    listen 80;
    # 로그 파일 위치 설정
    access_log /var/log/nginx/vue_app_access.log;
    error_log /var/log/nginx/vue_app_error.log;
    # 정적 파일과 index.html 서빙
    root /usr/share/nginx/html;
    index index.html;
    # 모든 요청을 Vue 앱으로 리다이렉트
    location / {
        try_files $uri $uri/ /index.html;
        # CORS 설정
        add_header 'Access-Control-Allow-Origin' '*';
        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
        add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept';
    }
    # 추가적인 설정이 필요한 경우 여기에 작성하세요.
}
@dhkdtld37 dhkdtld37 changed the title default.conf [ 설정 ] default.conf Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant