diff --git a/apps/rompr/README.md b/apps/rompr/README.md new file mode 100644 index 0000000..4a5ac74 --- /dev/null +++ b/apps/rompr/README.md @@ -0,0 +1,3 @@ +lighttpd is configured in etc_lighttpd +generate a configmap with: + kubectl create configmap rompr-lighttpd-config --from-file etc_lighthttpd/ diff --git a/apps/rompr/deployment.yaml b/apps/rompr/deployment.yaml index 29f49d7..fc3d2ae 100644 --- a/apps/rompr/deployment.yaml +++ b/apps/rompr/deployment.yaml @@ -32,7 +32,7 @@ spec: name: http volumeMounts: - name: rompr-data - mountPath: /var/www/localhost/htdocs + mountPath: /rompr - name: rompr-lighttpd-config mountPath: /etc/lighttpd volumes: @@ -49,29 +49,15 @@ metadata: name: rompr spec: ports: - - name: php-fpm - port: 9000 - name: http port: 80 selector: app: rompr --- -apiVersion: v1 -kind: ConfigMap -metadata: - name: rompr -data: - SCRIPT_FILENAME: "/rompr/index.php" ---- apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: rompr - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/backend-protocol: "FCGI" - nginx.ingress.kubernetes.io/fastcgi-index: "index.php" - nginx.ingress.kubernetes.io/fastcgi-params-configmap: "rompr" spec: rules: - host: musik.lan @@ -79,7 +65,7 @@ spec: paths: - backend: serviceName: rompr - servicePort: php-fpm + servicePort: http --- apiVersion: v1 kind: PersistentVolumeClaim diff --git a/apps/rompr/etc_lighthttpd/lighttpd.conf b/apps/rompr/etc_lighthttpd/lighttpd.conf index 12a1c9b..662df59 100644 --- a/apps/rompr/etc_lighthttpd/lighttpd.conf +++ b/apps/rompr/etc_lighthttpd/lighttpd.conf @@ -4,7 +4,7 @@ ############################################################################### # {{{ variables -var.basedir = "/var/www/localhost" +var.basedir = "/rompr" var.logdir = "/var/log/lighttpd" var.statedir = "/var/lib/lighttpd" # }}} @@ -50,9 +50,9 @@ include "mod_fastcgi_fpm.conf" # {{{ server settings server.username = "lighttpd" -server.groupname = "lighttpd" +server.groupname = "www-data" -server.document-root = var.basedir + "/htdocs" +server.document-root = var.basedir server.pid-file = "/run/lighttpd.pid" #server.errorlog = "/dev/pts/0" diff --git a/apps/rompr/etc_lighthttpd/mod_fastcgi_fpm.conf b/apps/rompr/etc_lighthttpd/mod_fastcgi_fpm.conf index 926137a..4290301 100644 --- a/apps/rompr/etc_lighthttpd/mod_fastcgi_fpm.conf +++ b/apps/rompr/etc_lighthttpd/mod_fastcgi_fpm.conf @@ -5,7 +5,7 @@ server.modules += ("mod_fastcgi") fastcgi.server = ( ".php" => - ( "localhost" => + ( ( "host" => "127.0.0.1", "port" => "9000"