Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions release-1.29.2/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
server {
listen 80;
server_name localhost;

#access_log /var/log/nginx/host.access.log main;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

location = /status {
stub_status;
}

#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/share/nginx/html;
}

# 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;
#}
}
32 changes: 32 additions & 0 deletions release-1.29.2/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/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 /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}
71 changes: 71 additions & 0 deletions release-1.29.2/rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: nginx
summary: nginx web server
description: nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server.
version: "release-1.29.2"
base: [email protected]
license: Apache-2.0
services:
nginx:
override: replace
command: nginx -g 'daemon off;'
startup: enabled
platforms:
amd64:
parts:
nginx:
plugin: autotools
source: https://nginx.org/download/nginx-.tar.gz
build-packages:
- libgd-dev
- libpcre3-dev
- libssl-dev
- zlib1g-dev
stage-packages:
- libpcre3-dev
autotools-configure-parameters:
- --prefix=/usr/share/nginx
- --user=nginx
- --sbin-path=/usr/sbin/nginx
- --conf-path=/etc/nginx/nginx.conf
- --http-log-path=/var/log/nginx/access.log
- --error-log-path=/var/log/nginx/error.log
- --with-pcre
- --lock-path=/var/lock/nginx.lock
- --pid-path=/var/run/nginx.pid
- --with-http_ssl_module
- --with-http_image_filter_module=dynamic
- --modules-path=/etc/nginx/modules
- --with-http_v2_module
- --with-stream=dynamic
- --with-http_addition_module
- --with-http_mp4_module
- --with-http_stub_status_module
override-build: |
set -x
craftctl default
rm $CRAFT_PART_INSTALL/etc/nginx/nginx.conf
# Create the nginx user
groupadd --root ${CRAFT_PART_INSTALL} nginx
useradd -d /home/nginx -s /bin/bash --root ${CRAFT_PART_INSTALL} -g nginx nginx
source-tag: release-1.29.2
config:
plugin: dump
after:
- nginx
source: .
organize:
nginx.conf: etc/nginx/nginx.conf
default.conf: etc/nginx/conf.d/default.conf
ca-certs:
plugin: nil
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
- nginx
- config
- ca-certs
override-prime: |
set -x
mkdir -p $CRAFT_PRIME/usr/share/rocks/
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query --admindir=$CRAFT_PRIME/var/lib/dpkg/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > $CRAFT_PRIME/usr/share/rocks/dpkg.query
Loading