auto now hosts django apps
added devfs_rule configs for jails configure mail ipv6 settings windows2019 VM
This commit is contained in:
1
jails/config/auto/local_settings.py
Normal file
1
jails/config/auto/local_settings.py
Normal file
@ -0,0 +1 @@
|
||||
DEBUG = False
|
211
jails/config/auto/nginx.conf
Normal file
211
jails/config/auto/nginx.conf
Normal file
@ -0,0 +1,211 @@
|
||||
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
# This default error log path is compiled-in to make sure configuration parsing
|
||||
# errors are logged somewhere, especially during unattended boot when stderr
|
||||
# isn't normally logged anywhere. This path will be touched on every nginx
|
||||
# start regardless of error log location configured here. See
|
||||
# https://trac.nginx.org/nginx/ticket/147 for more info.
|
||||
#
|
||||
#error_log /var/log/nginx/error.log;
|
||||
#
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:80;
|
||||
listen [::]:80;
|
||||
server_name auto.ahlawat.com auto;
|
||||
|
||||
location / {
|
||||
root /usr/local/www/nginx;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:80;
|
||||
listen [::]:80;
|
||||
server_name portfolio.ahlawat.com portfolio;
|
||||
|
||||
location / {
|
||||
return 301 https://portfolio.ahlawat.com$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name portfolio.ahlawat.com;
|
||||
|
||||
ssl_certificate /mnt/certs/fullchain.pem;
|
||||
ssl_certificate_key /mnt/certs/privkey.pem;
|
||||
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 5m;
|
||||
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
location /favicon.ico { access_log off; log_not_found off; }
|
||||
location /static/ {
|
||||
root /data/portfolio;
|
||||
}
|
||||
location /media/ {
|
||||
root /data/portfolio;
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://unix:/var/run/portfolio.sock;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/local/www/nginx-dist;
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# proxy_pass http://127.0.0.1;
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
||||
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:80;
|
||||
listen [::]:80;
|
||||
server_name producthunt.ahlawat.com producthunt;
|
||||
|
||||
location / {
|
||||
return 301 https://producthunt.ahlawat.com$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name producthunt.ahlawat.com;
|
||||
|
||||
ssl_certificate /mnt/certs/fullchain.pem;
|
||||
ssl_certificate_key /mnt/certs/privkey.pem;
|
||||
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 5m;
|
||||
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
location /favicon.ico { access_log off; log_not_found off; }
|
||||
location /static/ {
|
||||
root /data/producthunt;
|
||||
}
|
||||
location /media/ {
|
||||
root /data/producthunt;
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://unix:/var/run/producthunt.sock;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/local/www/nginx-dist;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# another virtual host using mix of IP-, name-, and port-based configuration
|
||||
#
|
||||
#server {
|
||||
# listen 8000;
|
||||
# listen somename:8080;
|
||||
# server_name somename alias another.alias;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
|
||||
# HTTPS server
|
||||
#
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# server_name localhost;
|
||||
|
||||
# ssl_certificate cert.pem;
|
||||
# ssl_certificate_key cert.key;
|
||||
|
||||
# ssl_session_cache shared:SSL:1m;
|
||||
# ssl_session_timeout 5m;
|
||||
|
||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
}
|
52
jails/config/auto/portfolio
Executable file
52
jails/config/auto/portfolio
Executable file
@ -0,0 +1,52 @@
|
||||
# Copyright (c) 2018-2020, diyIT.org
|
||||
# All rights reserved.
|
||||
#
|
||||
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
||||
# https://diyit.org/license/
|
||||
#
|
||||
#
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# the two lines below are not just comments but required by rcorder; service -e
|
||||
# PROVIDE: portfolio
|
||||
# REQUIRE: NETWORKING DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
: ${portfolio_enable="NO"}
|
||||
|
||||
name=portfolio
|
||||
port=8000
|
||||
appdir="/data/${name}"
|
||||
|
||||
rcvar=${name}_enable
|
||||
|
||||
GUNICORN_CMD="/usr/local/bin/gunicorn -D -b unix:/var/run/${name}.sock --log-file /var/log/${name}.log \
|
||||
--chdir ${appdir} ${name}.wsgi"
|
||||
# GUNICORN_CMD="/usr/local/bin/gunicorn -D -b 0.0.0.0:${port} -b [::]:${port} --log-file /var/log/${name}.log \
|
||||
# --chdir ${appdir} ${name}.wsgi"
|
||||
|
||||
start_cmd="server_start"
|
||||
stop_cmd="server_stop"
|
||||
restart_cmd="server_restart"
|
||||
|
||||
server_start()
|
||||
{
|
||||
$GUNICORN_CMD
|
||||
}
|
||||
|
||||
server_stop()
|
||||
{
|
||||
ps ax | grep -ie "gunicorn: master \[${name}.wsgi\]" | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
ps ax | grep -ie "gunicorn: worker \[${name}.wsgi\]" | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
}
|
||||
|
||||
server_restart()
|
||||
{
|
||||
ps ax | grep -ie "gunicorn: master \[${name}.wsgi\]" | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
server_start
|
||||
}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
52
jails/config/auto/producthunt
Executable file
52
jails/config/auto/producthunt
Executable file
@ -0,0 +1,52 @@
|
||||
# Copyright (c) 2018-2020, diyIT.org
|
||||
# All rights reserved.
|
||||
#
|
||||
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
||||
# https://diyit.org/license/
|
||||
#
|
||||
#
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# the two lines below are not just comments but required by rcorder; service -e
|
||||
# PROVIDE: producthunt
|
||||
# REQUIRE: NETWORKING DAEMON
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
: ${producthunt_enable="NO"}
|
||||
|
||||
name=producthunt
|
||||
port=8000
|
||||
appdir="/data/${name}"
|
||||
|
||||
rcvar=${name}_enable
|
||||
|
||||
GUNICORN_CMD="/usr/local/bin/gunicorn -D -b unix:/var/run/${name}.sock --log-file /var/log/${name}.log \
|
||||
--chdir ${appdir} ${name}.wsgi"
|
||||
# GUNICORN_CMD="/usr/local/bin/gunicorn -D -b 0.0.0.0:${port} -b [::]:${port} --log-file /var/log/${name}.log \
|
||||
# --chdir ${appdir} ${name}.wsgi"
|
||||
|
||||
start_cmd="server_start"
|
||||
stop_cmd="server_stop"
|
||||
restart_cmd="server_restart"
|
||||
|
||||
server_start()
|
||||
{
|
||||
$GUNICORN_CMD
|
||||
}
|
||||
|
||||
server_stop()
|
||||
{
|
||||
ps ax | grep -ie "gunicorn: master \[${name}.wsgi\]" | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
ps ax | grep -ie "gunicorn: worker \[${name}.wsgi\]" | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
}
|
||||
|
||||
server_restart()
|
||||
{
|
||||
ps ax | grep -ie "gunicorn: master \[${name}.wsgi\]" | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
server_start
|
||||
}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
Reference in New Issue
Block a user