diff --git a/roles/lamp/defaults/main.yml b/roles/lamp/defaults/main.yml index 53ae23e..1641f00 100644 --- a/roles/lamp/defaults/main.yml +++ b/roles/lamp/defaults/main.yml @@ -2,3 +2,4 @@ site_conf: example.com.conf php_verison: "8.4" mysql_db_name: mysql mysql_db_user: mysql +web_root: "/var/www/{{ hostname }}" diff --git a/roles/lamp/templates/example.com.conf.j2 b/roles/lamp/templates/example.com.conf.j2 index e69de29..62957b2 100644 --- a/roles/lamp/templates/example.com.conf.j2 +++ b/roles/lamp/templates/example.com.conf.j2 @@ -0,0 +1,17 @@ + +ServerName {{ hostname }} +DirectoryIndex index.php index.html +DocumentRoot {{ web_root }} + + Options +FollowSymlinks -Indexes + AllowOverride All + Require all granted + + + Dav off + + + SetEnv HOME {{ web_root }} + SetEnv HTTP_HOME {{ web_root }} + +