Salut à tous
Voilà, je recontre quelques problèmes à configurer un serveur web depuis le passage à Jessie.
Il y a 2 virtual host :
1- phpphadmin -> page blanche
2- un site symfony2 -> il me télécharge le fichier php au lieu de l’executer.
Pour l’installation, j’ai utilisé apt-get install nginx
- apt-get install nginx
- apt-get install postgresql postgresql-client
- config de postgresql
- apt-get install phppgadmin php5-intl php5-fpm (php5 a bien été installé ici)
- apt-get remove --purge apache2
- et config de nginx ci dessous
Pour postgresql, j’ai une page blanche qui s’affiche. dans les log, uniquement des réponses 200 (sauf si j’appelle une page qui n’existe pas.
Pourtant cette config fonctionne sur un autre serveur :
[code]server {
listen 80;
server_name pg.localhost;
rewrite ^/(.*) https://$server_name/$1 permanent; # force redirect http to https
}
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/certs/cacert.pem; # path to your cacert.pem
ssl_certificate_key /etc/nginx/certs/privkey.pem; # path to your privkey.pem
server_name pg.localhost;
location / {
root /usr/share/phppgadmin/;
index index.php index.html index.htm;
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phppgadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
}[/code]
J’ai ajouté une ligne au fichier hosts biensur : [mono]127.0.0.1 pg.localhost[/mono]
ls /usr/share/phppgadmin/
admin.php domains.php languages.php sequences.php
aggregates.php fulltext.php libraries servers.php
ajax-ac-insert.php functions.js links.js sqledit.php
all_db.php functions.php login.php sql.php
browser.php groups.php logout.php tables.js
casts.php help multiactionform.js tablespaces.php
classes help.php opclasses.php tables.php
colproperties.php history.php operators.php tblproperties.php
conf images plugin.php themes
constraints.php indexes.js plugins triggers.php
conversions.php indexes.php privileges.php types.php
database.php index.php redirect.php users.php
dataexport.php info.php robots.txt viewproperties.php
dataimport.php intro.php roles.php views.php
dbexport.php js rules.php xloadtree
display.php lang
Concernant symfony :
j’ai essayé une multitude de fichier config que j’ai trouvé sur le site officiel de symfony, ou autre. Le résultat est toujours le même. Le téléchargement du fichier php.
Actuellement, j’ai une version plus light : je peux naviguer dans le dossier home, mais à l’ouverture du php, il me propose donc le téléchargement
Niveau log, rien d’autre que des réponse 200
[code]server {
autoindex on;
listen 80;
server_name s.localhost;
root /home/test/code/;
# Logging
error_log /var/log/nginx/s-error.log;
access_log /var/log/nginx/s-access.log;
# Handle static files, redirect to app.php if not found
location / {
try_files $uri /app.php;
}
# Pass the PHP scripts to FastCGI server
location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
[/code]
J’espère que vous saurez m’aider
Merci