SOFT
SPRINT

softsprint.net
Shop

PrestaShop design Apache Httpd

Вибачте цей текст доступний тільки в “англійська”.

The accompanying document is given as an illustration setup to your Apache worker. It could be fragmented, and recollect you should adjust it for your own worker’s necessities!

In Apache 2.4, Order Allow,Deny has been supplanted by Require all conceded. We expect you are utilizing Apache Http 2.4 or higher.

With mod_php/PHP-CGI PrestaShop

 

<VirtualHost *:80> # or 443 for SSL support

ServerName example.com
DocumentRoot /path/to/prestashop

# SSLEngine on
# SSLCertificateFile /etc/apache2/ssl/example.crt
# SSLCertificateKeyFile /etc/apache2/ssl/example.key

<Directory /path/to/prestashop>
# enable the .htaccess rewrites
AllowOverride All
Options +Indexes
Require all granted

# Disable back office token
# SetEnv _TOKEN_ disabled
</Directory>

ErrorLog /var/log/apache2/prestashop.error.log
CustomLog /var/log/apache2/prestashop.access.log combined
</VirtualHost>

With PHP-FPM

You initially need to guarantee you have the php-fpm binary and Apache’s FastCGI introduced. On a Debian based, bundles are libapache2-mod-fcgid and php7.1-fpm.

Subsequent to installating these bundles, fpm administration will naturally be begun. PHP-FPM utilizes alleged pools to deal with approaching FastCGI demands.

Here’s a model:

; a pool called www
[www]
user = www-data
group = www-data

; use a unix domain socket
listen = /var/run/php/php7.1-fpm.sock
; or listen on a TCP socket
; listen = 127.0.0.1:9000

You likewise need to empower not many modules that are needed for the design of different PHP forms with Apache.

a2enmod alias proxy proxy_fcgi

At long last, arrange the Apache VirtualHost to run with FPM/FastCGI. Remember to alter this setup to make it works.

<VirtualHost *:80> # or 443 for SSL support

ServerName example.com
DocumentRoot /path/to/prestashop

# SSLEngine on
# SSLCertificateFile /etc/apache2/ssl/example.crt
# SSLCertificateKeyFile /etc/apache2/ssl/example.key

# Uncomment the following line to force Apache to pass the Authorization
# header to PHP: required for "basic_auth" under PHP-FPM and FastCGI
#
# SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1

# For Apache 2.4 or higher
# Using SetHandler avoids issues with using ProxyPassMatch in combination
# with mod_rewrite or mod_autoindex
<FilesMatch \.php$>
# SetHandler proxy:fcgi://127.0.0.1:9000
SetHandler proxy:unix:/var/run/php/php7.1-fpm.sock|fcgi://dummy
</FilesMatch>

DocumentRoot /path/to/prestashop
<Directory /path/to/prestashop>
# enable the .htaccess rewrites
AllowOverride All
Options +Indexes
Require all granted

# Disable back office token
# SetEnv _TOKEN_ disabled
</Directory>

ErrorLog /var/log/apache2/prestashop.error.log
CustomLog /var/log/apache2/prestashop.access.log combined
</VirtualHost>
КОНТАКТИ
Cookies | Privacy Policy | Terms and ConditionsSoftSprint ©