From 9f57894d2a4e52968b8ab5e3c4036564ae5d8124 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Fri, 30 Apr 2021 22:23:34 +0200 Subject: [PATCH] add config for apache --- config/packages/framework.yaml | 2 +- doc/apache2/dev.conf | 41 ++++++++++++++++++++++++++++++++++ doc/apache2/dev_php_fpm.conf | 26 +++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 doc/apache2/dev.conf create mode 100644 doc/apache2/dev_php_fpm.conf diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index c507173..03b0d8f 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,6 +1,6 @@ # see https://symfony.com/doc/current/reference/configuration/framework.html framework: - trusted_hosts: ['localhost:4200', 'localhost', 'framadate-api.cipherbliss.com'] + trusted_hosts: ['localhost:4200', 'localhost', 'tktest.lan', 'framadate-api.cipherbliss.com'] secret: '%env(APP_SECRET)%' #csrf_protection: true #http_method_override: true diff --git a/doc/apache2/dev.conf b/doc/apache2/dev.conf new file mode 100644 index 0000000..347ef7c --- /dev/null +++ b/doc/apache2/dev.conf @@ -0,0 +1,41 @@ + + ServerName www.tktest.lan + ServerAlias www.tktest.lan + + # 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.9 or higher + # Using SetHandler avoids issues with using ProxyPassMatch in combination + # with mod_rewrite or mod_autoindex + + SetHandler proxy:fcgi://127.0.0.1:9000 + # for Unix sockets, Apache 2..10 or higher + # SetHandler proxy:unix:/path/to/fpm.sock|fcgi://dummy + + + # If you use Apache version below 2.4.9 you must consider update or use this instead + # ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/public/$1 + + # If you run your Symfony application on a subpath of your document root, the + # regular expression must be changed accordingly: + # ProxyPassMatch ^/path-to-app/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/public/$1 + + DocumentRoot /var/www/html/date-poll-api/public + + # enable the .htaccess rewrites + AllowOverride All + Require all granted + + + # uncomment the following lines if you install assets as symlinks + # or run into problems when compiling LESS/Sass/CoffeeScript assets + # + # Options FollowSymlinks + # + + ErrorLog /var/log/apache2/tktest_error.log + CustomLog /var/log/apache2/tktest_access.log combined + diff --git a/doc/apache2/dev_php_fpm.conf b/doc/apache2/dev_php_fpm.conf new file mode 100644 index 0000000..4227c00 --- /dev/null +++ b/doc/apache2/dev_php_fpm.conf @@ -0,0 +1,26 @@ + + ServerName tktest.lan + ServerAlias www.tktest.lan + + AddHandler php7-fcgi .php + Action php7-fcgi /php7-fcgi + Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi + FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -host 127.0.0.1:9000 -pass-header Authorization + + DocumentRoot /var/www/html/date-poll-api/public + + # enable the .htaccess rewrites + AllowOverride All + Order Allow,Deny + Allow from all + + + # uncomment the following lines if you install assets as symlinks + # or run into problems when compiling LESS/Sass/CoffeeScript assets + # + # Options FollowSymlinks + # + + ErrorLog /var/log/apache2/tktest_error.log + CustomLog /var/log/apache2/tktest_access.log combined +