Commit Graph

12 Commits

Author SHA1 Message Date
d2e704ae84 Remove parenthesis from nginx config comment 2025-11-24 12:08:18 +09:00
ea677183ca Fix CSRF 403 error: add X-Forwarded-Host header to Nginx and update CSRF_TRUSTED_ORIGINS
- Created nginx-smartsoltech-fixed.conf with proper SSL and CSRF support
- Preserved existing SSL certificates from /etc/letsencrypt/live/www.smartsoltech.kr/
- Added X-Forwarded-Host header (critical for Django CSRF validation)
- Fixed location block order (static/media before /)
- Implemented proper HTTP→HTTPS and www→non-www redirects
- Updated CSRF_FIX.md with comprehensive troubleshooting guide
2025-11-24 12:03:26 +09:00
a70ee08821 🔧 Fix static files serving in Nginx
CRITICAL FIX: Static files (CSS/JS) not loading after changing web:8000 to localhost:8000

Changes:
- nginx-smartsoltech.conf: Enabled /static/ and /media/ locations BEFORE location /
- NGINX_SETUP.md: Updated config to serve static files directly from filesystem
- NGINX_STATIC_FIX.md: Comprehensive troubleshooting guide for static files issues

Why this matters:
- Nginx must serve /static/ and /media/ DIRECTLY from filesystem (fast)
- NOT proxy to Django (slow)
- Order matters: location /static/ MUST be before location /
- Improves performance: 50-100ms → 1-5ms per static file request

Solution on server:
1. git pull origin master
2. sudo cp nginx-smartsoltech.conf /etc/nginx/sites-available/smartsoltech
3. sudo nginx -t && sudo systemctl reload nginx
2025-11-24 11:54:54 +09:00
b93ab4d796 🌐 Add Nginx configuration and setup scripts
- Added nginx-smartsoltech.conf: Ready-to-use Nginx config with SSL, proxy, security headers
- Added setup-nginx.sh: Automated Nginx setup script with symlink creation
- Added NGINX_SETUP.md: Comprehensive Nginx setup guide with troubleshooting
- Added NGINX_QUICK_SETUP.md: Quick reference cheatsheet

Features:
- HTTP to HTTPS redirect
- www to non-www redirect
- Proxy to Django (localhost:8000)
- SSL configuration (ready for Let's Encrypt)
- Security headers (HSTS, XSS, etc)
- Logging configuration
- Automated default removal and symlink creation
2025-11-24 11:49:52 +09:00
a2317bc619 🔧 Fix manage.py path in deployment scripts
- Changed 'python manage.py' to 'python smartsoltech/manage.py' in all deployment scripts
- Fixed deploy.sh, quick-deploy.sh
- Updated DEPLOYMENT_GUIDE.md and DEPLOYMENT_SCRIPTS.md documentation
- Added SERVER_FIX.md with instructions for server fix

Fixes issue: python: can't open file '/app/manage.py': [Errno 2] No such file or directory
2025-11-24 11:38:11 +09:00
1da6180658 prod 2025-11-24 11:31:29 +09:00
ce7119e9e9 feat: добавлена модель TeamMember для управления командой через админку 2025-11-24 09:23:45 +09:00
3cea013a8e feat: добавлены модели AboutPage и FooterSettings с админ-панелью и интеграцией скриптов 2025-11-24 09:18:22 +09:00
ee3a1bf846 feat: добавлена современная страница деталей услуги с портфолио и отзывами 2025-11-24 09:05:48 +09:00
faa02b79c0 docs: add QUICKSTART guide for quick deployment 2025-11-24 07:12:52 +09:00
d9adac609b chore: reorganize project structure and prepare for deployment
- Organize files into logical directories (docs/, scripts/, tests/)
- Add comprehensive documentation (README, CONTRIBUTING, CHANGELOG)
- Create deployment automation scripts
- Add Docker production configuration
- Update .gitignore and add .dockerignore
- Remove temporary and test files from root
- Improve settings.py with DEBUG from env variable

Added:
- README.md with project overview
- CONTRIBUTING.md for contributors
- CHANGELOG.md for version tracking
- PROJECT_STATUS.md with current state
- docker-compose.prod.yml for production
- nginx.conf for production web server
- scripts/deploy.sh for automated deployment
- scripts/check-config.sh for configuration validation
- scripts/setup-ssl.sh for SSL certificate setup
- docs/DEPLOYMENT.md with detailed deployment guide
- docs/ENV_VARIABLES.md with all environment variables

Moved:
- Documentation to docs/
- Scripts to scripts/
- Test files to tests/

Removed:
- .history/ directory
- Test response JSON files from root
- settings_production.py (merged into settings.py)

This commit prepares the project for:
- Production deployment
- Team collaboration
- Docker containerization
- Proper documentation
2025-11-24 07:12:04 +09:00
7bf003e70d init commit 2025-11-24 07:02:33 +09:00