Winginx includes PHP 5 and 7.
The index PHP script is index.php.
Use Winginx PHP 5/7 Config to configure easily your PHP, its extensions and Zend Guard Loader (Zend Optimizer), Xdebug, ionCube.
- memory_limit = 128M
- max_execution_time = 120
- max_input_time = 60
- post_max_size = 50M
- upload_max_filesize = 40M
- file_uploads = On
- upload_tmp_dir = temp/php/upload
- date.timezone = Europe/Moscow
- session.use_cookies = 1
- session.name = PHPSESSID
- default_socket_timeout = 60
- short_open_tag = On
- asp_tags = Off
- error_reporting = E_ALL & ~E_NOTICE
- display_errors = On
- html_errors = Off
- log_errors = Off
- error_log = error.log
- safe_mode = Off
- register_globals = Off
- register_long_arrays = Off
- variables_order = EGPCS
- magic_quotes_gpc = Off
- magic_quotes_runtime = Off
- magic_quotes_sybase = Off
- allow_url_fopen = On
- allow_url_include = Off
Individual PHP config for a website
Web server Apache has the .htaccess system to configure individual params for a website. It's cool! But such files are useless in nginx :)
Yes, it is a bit of problem that has a solution, although it may seem unusual to those who always worked with Apache.
So. It is possible to configure PHP through a .user.ini file in the document root of a website, e.g. winginx\home\localhost\public_html\.user.ini.
The syntax of .user.ini is similar to php.ini. Example:
memory_limit = 1024M post_max_size = 500M date.timezone = Asia/Irkutsk
It is recommended to configure .user.ini for a website, but not winginx\php5\php.ini.
All changes to .user.ini take effect immediately, you don't need to restart the server or PHP.
Note! This way you can configure PHP with Apache, if installed as CGI / FastCGI.
When you create a website using Winginx TM you can set up some PHP parameters in a special tab. Afterwards you can edit them in the .user.ini file in the website home directory.