![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 242 Pomógł: 0 Dołączył: 28.11.2014 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Mam taki problem ponieważ mam VPS na ubuntu i zainstalowałem tam MYSQL + Nginx + PHP5. Strona wszystko ładnie śmiga tylko zamiast odtwarzać pliki .php ten je pobiera. Wiecie może jak to rozwiązać ? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 1 798 Pomógł: 307 Dołączył: 13.05.2009 Skąd: Gubin/Wrocław Ostrzeżenie: (0%) ![]() ![]() |
Ok więc polećmy po kolei, edytuj ten plik:
Kod /etc/php5/fpm/pool.d/www.conf I upewnij się że Kod listen ma taką wartość:Kod listen = /var/run/php5-fpm.sock Jeżeli nie ma to podmień na tą i jeżeli podmieniasz to zrestartuj fpm'a: Kod sudo service php5-fpm restart Następnie ten plik: /etc/nginx/sites-avaliable/default podmień jego zawartość na: Kod server { listen 80; root /usr/share/nginx/www; index index.php index.html index.htm; server_name localhost; location / { try_files $uri $uri/ /index.html; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } } Potem zrestartuj nginxa. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 7.10.2025 - 11:50 |