Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
apache
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
webarch
apache
Commits
9ce8e65b
Commit
9ce8e65b
authored
5 years ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
fixes for when php isn't installed
parent
4b7b67ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#10805
passed
5 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/a2mod.yml
+2
-2
2 additions, 2 deletions
tasks/a2mod.yml
tasks/checks.yml
+6
-2
6 additions, 2 deletions
tasks/checks.yml
templates/localhost.conf.j2
+3
-3
3 additions, 3 deletions
templates/localhost.conf.j2
with
11 additions
and
7 deletions
tasks/a2mod.yml
+
2
−
2
View file @
9ce8e65b
...
...
@@ -32,7 +32,7 @@
-
"
libapache2-mod-php{{
apache_php_version
}}"
state
:
absent
update_cache
:
false
when
:
'
"apache_phpfpm_mod"
in
apache_mods_disabled
'
when
:
( apache_php ) and (
"apache_phpfpm_mod" in apache_mods_disabled
)
-
name
:
Disable modules
apache2_module
:
...
...
@@ -83,7 +83,7 @@
-
"
libapache2-mod-php{{
apache_php_version
}}"
state
:
present
update_cache
:
false
when
:
'
"apache_phpfpm_mod"
in
apache_mods_enabled
'
when
:
( apache_php ) and (
"apache_phpfpm_mod" in apache_mods_enabled
)
-
name
:
Apache modules enabled
apache2_module
:
...
...
This diff is collapsed.
Click to expand it.
tasks/checks.yml
+
6
−
2
View file @
9ce8e65b
...
...
@@ -180,11 +180,15 @@
when
:
apache_version is version('2.4.41', '>=')
-
name
:
Check if phpquery is installed
shell
:
which phpquery || echo
absent
shell
:
which phpquery || echo
ABSENT
check_mode
:
false
register
:
apache_phpquery_path
changed_when
:
'
"phpquery"
not
in
apache_phpquery_path.stdout'
-
name
:
Set the apache_php variable to
true
or
false
set_fact
:
apache_php
:
"
{%
if
apache_phpquery_path.stdout
==
'ABSENT'
%}false{%
else
%}true{%
endif
%}"
-
name
:
Check PHP version
block
:
...
...
@@ -210,7 +214,7 @@
-
"
apache_phpfpm_conf:
{{
apache_phpfpm_conf
}}"
verbosity
:
2
when
:
( apache_php
query_path
is defined ) and ( apache_php
query_path.stdout == "/usr/sbin/phpquery"
)
when
:
( apache_php is defined ) and ( apache_php )
-
name
:
Check loaded modules
block
:
...
...
This diff is collapsed.
Click to expand it.
templates/localhost.conf.j2
+
3
−
3
View file @
9ce8e65b
...
...
@@ -21,7 +21,7 @@
</
Location
>
</
IfModule
>
{%
endif %}
{%
if
"proxy_fcgi"
in
apache_mods_enabled %}
{%
if
apache_php
and
if
"proxy_fcgi"
in
apache_mods_enabled %}
<
Location
/status
>
SetHandler
"proxy:unix:/run/php/php{{ apache_php_version }}-fpm.sock|fcgi://localhost/"
Require
host
localhost 127.0.0.1 ::1
...
...
@@ -35,7 +35,7 @@
AllowOverride
AuthConfig
Indexes
FileInfo
Limit
Require
host
localhost 127.0.0.1 ::1
{%
if
apache_mods_enabled is defined %}
{%
if
apache_phpfpm_mod is defined
and
apache_phpfpm_mod
in
apache_mods_enabled %}
{%
if
apache_php
and
if
apache_phpfpm_mod is defined
and
apache_phpfpm_mod
in
apache_mods_enabled %}
<
IfModule
php7_module
>
php_admin_value doc_root /var/www/localhost
php_admin_value open_basedir /var/www/localhost/:/tmp/:/usr/share/php/
...
...
@@ -44,7 +44,7 @@
</
FilesMatch
>
</
IfModule
>
{%
endif %}
{%
if
"proxy_fcgi"
in
apache_mods_enabled %}
{%
if
apache_php
and
if
"proxy_fcgi"
in
apache_mods_enabled %}
# https://wiki.apache.org/httpd/PHP-FPM#Proxy_via_handler
<
IfModule
proxy_fcgi_module
>
<
IfModule
setenvif_module
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment