Answer the question
In order to leave comments, you need to log in
PHP is executed from the root of the site, and downloaded from the folder. Why?
I decided to try using puphpet.com to create a vagrant environment immediately on DigitalOcean.com, but I ran into the fact that PHP files from the site root are being executed, that is, site.com/ is being executed, site.com/index.php is also being executed, site.com/phpinfo .php - the source code of the file is downloaded. Next, I uploaded PHPMyAdmin to the /pma/ folder and try to open site.com/pma/ in the browser - it downloads an empty download file.
Piece of Vagrant config
nginx:
install: '1'
settings:
version: present
default_vhost: 1
proxy_buffers: '4 256k'
proxy_buffer_size: 128k
proxy_connect_timeout: 600s
proxy_send_timeout: 600s
proxy_read_timeout: 600s
names_hash_bucket_size: 128
upstreams: { }
vhosts:
nxv_b08m6i7th6vi:
server_name: do-parse-sg.dev
www_root: /var/www/do-parse-sg.dev/public
listen_port: '80'
client_max_body_size: 1m
ssl: '0'
locations:
nxvl_mamkhw4x30hc:
www_root: /var/www/do-parse-sg.dev/public
location: /
autoindex: 'off'
internal: 'false'
index_files:
- index.html
- index.php
- app.php
try_files:
- $uri
- $uri/
- /index.php$is_args$args
- /app.php$is_args$args
fastcgi: ''
fastcgi_index: ''
fastcgi_split_path: ''
proxy: ''
proxy_redirect: ''
nxvl_a9b530co0qh1:
www_root: /var/www/do-parse-sg.dev/public
location: '~ ^/(app_dev|config)\.php(/|$)'
autoindex: 'off'
internal: 'false'
try_files:
- $uri
- $uri/
- /app_dev.php$is_args$args
fastcgi: '127.0.0.1:9000'
fastcgi_index: app_dev.php
fastcgi_split_path: '^(.+\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $document_root$fastcgi_script_name'
- 'APP_ENV dev'
set:
- '$path_info $fastcgi_path_info'
proxy: ''
proxy_redirect: ''
nxvl_7g5qj8e3fx9d:
www_root: /var/www/do-parse-sg.dev/public
location: '~ ^/index\.php(/|$)'
autoindex: 'off'
internal: 'false'
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: '127.0.0.1:9000'
fastcgi_index: index.php
fastcgi_split_path: '^(.+\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $document_root$fastcgi_script_name'
set:
- '$path_info $fastcgi_path_info'
proxy: ''
proxy_redirect: ''
nxvl_37trhw0b7p16:
www_root: /var/www/do-parse-sg.dev/public
location: '~ ^/app\.php(/|$)'
autoindex: 'off'
internal: 'false'
try_files:
- $uri
- $uri/
- /app.php$is_args$args
fastcgi: '127.0.0.1:9000'
fastcgi_index: app.php
fastcgi_split_path: '^(.+\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $document_root$fastcgi_script_name'
- 'APP_ENV prod'
set:
- '$path_info $fastcgi_path_info'
proxy: ''
proxy_redirect: ''
proxies: { }
php:
install: '1'
settings:
version: '7.1'
modules:
php:
- cli
- intl
- xml
- gd
- imagick
- apcu
- gearman
- igbinary
- libsodium
- memcache
- memcached
- mongodb
- mysqlnd
- phalcon
- redis
- yaml
pear: { }
pecl: { }
ini:
display_errors: 'On'
error_reporting: '-1'
session.save_path: /var/lib/php/session
date.timezone: UTC
fpm_ini:
error_log: /var/log/php-fpm.log
fpm_pools:
phpfp_w9qjv2p2d715:
ini:
prefix: www
listen: '127.0.0.1:9000'
security.limit_extensions: .php
user: www-user
group: www-data
composer: '1'
composer_home: ''
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question