forked from sylvain/hubzilla
hubzilla-nginx-v0.2
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName yourdomain.com
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
<Directory /var/www/html>
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
20
src/hubzilla-nginx.conf
Normal file
20
src/hubzilla-nginx.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /hubzilla-src;
|
||||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName yourdomain.com
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
<Directory /var/www/html>
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
18
src/start.sh
18
src/start.sh
@@ -1,7 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Démarrage du service Apache
|
||||
service apache2 start
|
||||
# Copie automatique si le volume bindé est vide
|
||||
if [ ! "$(ls -A /var/www/html)" ]; then
|
||||
echo "📁 Volume vide, initialisation des fichiers Hubzilla..."
|
||||
cp -a /hubzilla-src/. /var/www/html/
|
||||
chown -R www-data:www-data /var/www/html/
|
||||
else
|
||||
echo "📁 Volume déjà initialisé."
|
||||
fi
|
||||
|
||||
# Attente indéfinie pour maintenir le conteneur en cours d'exécution
|
||||
# Démarrage des services PHP-FPM et Nginx
|
||||
echo "🚀 Démarrage des services PHP-FPM et Nginx..."
|
||||
service php8.2-fpm start
|
||||
service nginx start
|
||||
|
||||
# Maintien du conteneur actif
|
||||
echo "📡 En attente (container actif)..."
|
||||
tail -f /dev/null
|
||||
Reference in New Issue
Block a user