Сейчас у меня настроена страница администрирования Drupal для обслуживания моего базового URL-адреса и корня моего сервера /home/ubuntu/portfolio/projects/drupal, но /home/ubuntu/portfolio/projects /drupal/admin/content (здесь Nginx попытается обслуживать http://example.com/admin/content) даже не является допустимым путем к файлу при установке Drupal. Поэтому я не уверен, как это будет правильно обслуживать нужные мне страницы.
Поэтому мои вопросы следующие:
- Где находятся файлы, предназначенные для обслуживания этих страниц администрирования, относительно моего базового каталога установки Drupal?
- Какие изменения следует внести Я добавляю файл .conf ниже в Nginx, чтобы корректно обслуживать их, не мешая другим блокам местоположения (или, по крайней мере, не нарушая их).
Код: Выделить всё
server{ listen 80 default_server; listen [::]:80 default_server; server_name example.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; listen [::]:443; server_name example.com; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; root /home/ubuntu/portfolio/projects/drupal; #show users the resume by default index index.php; # Other config you desire (TLS, logging, etc)... location /resume { return 302 /resume/; location /resume/ { root /home/ubuntu/portfolio; index index.html; } location /weatherapp { return 302 /weatherapp/; } location /weatherapp/ { root /home/ubuntu/portfolio; index index.html; } location /cryptoDesign { return 302 /cryptoDesign/; } location /cryptoDesign/ { root /home/ubuntu/portfolio; index index.html; } location ~ '\.php$|^/update.php' { #return 301 https://google.com; fastcgi_split_path_info ^(.+?\.php)(|/.*)$; # Ensure the php file exists. Mitigates CVE-2019-11043 try_files $fastcgi_script_name =404; # Security note: If you're running a version of PHP older than the # latest 5.3, you should have "cgi.fix_pathinfo = 0;" in php.ini. # See http://serverfault.com/q/627903/94922 for details. include fastcgi_params; # Block httpoxy attacks. See https://httpoxy.org/. fastcgi_param HTTP_PROXY ""; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param QUERY_STRING $query_string; fastcgi_intercept_errors on; # PHP 5 socket location. #fastcgi_pass unix:/var/run/php5-fpm.sock; # PHP 7 socket location. fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; } }
Подробнее здесь: https://stackoverflow.com/questions/654 ... status-404
Мобильная версия