Skip to content

Commit

Permalink
Develop Main Merge 2 (#358)
Browse files Browse the repository at this point in the history
* add gunicorn py files (#269)

Co-authored-by: lind <[email protected]>

* epoll test and textfile (#274)

* just the test and text file

* with .py and slight change to test

* fixing .py error

Co-authored-by: lind <[email protected]>

* add fchmod test to test suite (#275)

* add fchmod test to test suite

* fixing error message

Co-authored-by: lind <[email protected]>

* Add test cases for truncate and ftruncate (#283)

* Add test case for truncate and ftruncate

* Fix grammar mistake in error message

* Update dettests.txt

* Add fflush(NULL) after every print statement

* Add a separate testfile for truncate.c

* Add individual testfiles for different test cases

* Fix pipepong.c and Add mutex.c (#286)

* Fix pipepong.c and Add mutex.c

* Fix indentation

* Socketpair test (#290)

* socketpair test

* Added socketpair test in to dettests

Co-authored-by: lind <[email protected]>

* LAMP Scripts (#292)

* setuptools

* init

* add setup tools

* reorg

* reorg

* pr fix

---------

Co-authored-by: lind <[email protected]>

* Remove random prints from template.py and forkandopen.py (#295)

* Net shutdown test case (#294)

* [WIP]Setup threading and sockets

* Incorrect version(passes in lind)

* Add shutdown in fork test case

* Add more comments

* Add more comments and update nondet.txt

* Add 1sec delay for synchronization and more verbose error messages

* Use pthread barrier to sync up client and server in shutdown, socketselect, and socketepoll

* Destroy closebarriers and add correctness checking in shutdown.py

* small fix to epoll (#297)

Co-authored-by: lind <[email protected]>

* LAMP application and load scripts (#299)

* add flask app and config files

* Delete nginx.conf.backup

---------

Co-authored-by: lind <[email protected]>

* Simple web example (#300)

* libffi bootstrap

* Pared down webpage, trying to set up python to get ctypes working

* Made ctypes compile properly

---------

Co-authored-by: lind <[email protected]>

* Fixed #301 libfii ctypes segfaulting (#304)

* fixed #301 libfii ctypes segfaulting

Signed-off-by: lind <[email protected]>

* fix #301: update comments and load_python.sh

Signed-off-by: lind <[email protected]>

---------

Signed-off-by: lind <[email protected]>
Co-authored-by: lind <[email protected]>

* Tests of statfs/fstatfs (#312)

* Add statfs test

* Add fstatfs test

* Statfs test file

* fstatfs test file

* Add to test suite

* Update filepath

* Update filename

* Update

* Update

* Add new line

* Add new line

* Add check

* Change to dettests

* Make statfs/fstatfs work in test suite

* Update typo

* Update typo

* Add new line and remove extra space

* Refine format

* Test files for mknod/fchdir/poll (#313)

* Added Mknod, Fchdir and Poll Tests

* Auto Test Done

* Update fchdir.c

Updated else clauses

* Update dettests.txt

* Update mknod.c

* Update fchdir.c

* Update poll.c

* Update fchdir.c

* Update fchdir.py

* Delete mknod.c

* Update dettests.txt

* Update dettests.txt

---------

Co-authored-by: lind <[email protected]>

* Feature/new syscall tests cases (#306)

* Implementd test for pipe2 syscall.

* Implemented test for getifaddrs syscall.

* Implemented test for getppid syscall.

* Implemented test for mkdir and rmdir syscalls.

* Implemented test for access syscall.

* Updated getppid test to verify that pids match.

* Renamed access test; changed print string.

* Moved file name in creat_access test to #define clause.

* Renamed rmdir test to mkdir_rmdir; moved dir name to #define clause.

* Updated dettests.txt

* Added pipe2.py to check pipe2 test output; updated nondet.txt

* Added python script to verify getifaddrs; updated nondet.txt

* Updated pipe2 output checking; added missing newlines at the end of test files.

* Added newline characters at the end of files.

* Added fflush after printfs.

* Added fflushes.

* Add include

* Added flock test. (#315)

* Added flock test.

* Updated the flock test case to verify concurrent shared lock acquisition.

* Added newline at end of file.

* Fix Compilation Warning for flock.c

* Update flock.c

* fix: load libffi.so.5 in load_python.sh (#324)

Signed-off-by: RusherRG <[email protected]>

* Add Shared memory and semaphore tests (#323)

* tests: add shared memory and semaphores tests

Signed-off-by: RusherRG <[email protected]>

* tests: add shared sempahores with multiple cages test

Signed-off-by: RusherRG <[email protected]>

* tests: add buffer detach and removalin shm sem tests

Signed-off-by: RusherRG <[email protected]>

* tests: remove prints in shm sem tests

Signed-off-by: RusherRG <[email protected]>

* tests: update sleeps in shm sem tests

Signed-off-by: RusherRG <[email protected]>

* tests: fix exits

Signed-off-by: RusherRG <[email protected]>

* tests: add semaphore fork tests

Signed-off-by: RusherRG <[email protected]>

* tests: make shm_sem_fork_t a non-deterministic test

Signed-off-by: RusherRG <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>

* tests: update regex in forkandopen.py (#325)

Signed-off-by: RusherRG <[email protected]>

* Flask app fix (#330)

* fix: flask myproject.py sample app

Signed-off-by: RusherRG <[email protected]>

* chore: update run_lamp.sh

Signed-off-by: RusherRG <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>

* Adding fdatasync test files and fixing flock warning (#338)

Co-authored-by: lind <[email protected]>

* Test files for sync_file_range (#340)

* Adding fdatasync test files and fixing flock warning

* Adding sync_file_range

* Update dettests.txt

* Update sync_file_range.c

* Update sync_file_range.c

* Update sync_file_range.c

* Update sync_file_range.c

---------

Co-authored-by: lind <[email protected]>

* signal tests (#332)

Co-authored-by: lind <[email protected]>

* Uds tests (#333)

* tests: uds test files

Signed-off-by: RusherRG <[email protected]>

* tests: uds tests update

Signed-off-by: RusherRG <[email protected]>

* chore: update mklind script

Signed-off-by: RusherRG <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>
Co-authored-by: Nicholas Renner <[email protected]>

* tests: add IPC performance tests (#353)

* tests: formatting ipc_performance tests

Signed-off-by: RusherRG <[email protected]>

* tests: add optimization to ipc performance tests

Signed-off-by: lind <[email protected]>

* tests: update ipc performance test compile scripts

Signed-off-by: lind <[email protected]>

* tests: add buffer read write tests

Signed-off-by: lind <[email protected]>

* tests: add timers to buffer_read_write

Signed-off-by: lind <[email protected]>

* tests: update buffer read write scripts

Signed-off-by: lind <[email protected]>

* graphs

* graphs

* graphs

* graphs

* graphs

* tests: add buffer_read_write times

Signed-off-by: lind <[email protected]>

* feat: add ping/pong inet test scripts

Signed-off-by: lind <[email protected]>

* feat: update ping/pong inet test scripts

Signed-off-by: lind <[email protected]>

* test: remove flamegraphs from buffer_read_write

Signed-off-by: lind <[email protected]>

* test: remove perf files from inet

Signed-off-by: lind <[email protected]>

* test: update syscall_ratios with plotting scripts

Signed-off-by: lind <[email protected]>

* test: update total_runtime with plotting scripts

Signed-off-by: lind <[email protected]>

* test: update buffer_read_write formatting

Signed-off-by: lind <[email protected]>

* test: update total_runtime formatting

Signed-off-by: lind <[email protected]>

* test: add README.md in buffer_read_write

Signed-off-by: lind <[email protected]>

* test: add README.md in inet

Signed-off-by: lind <[email protected]>

* test: add README.md for all the tests in ipc_performance_tests

Signed-off-by: lind <[email protected]>

* tests: remove target/ from ipc_performance_tests/total_runtime/scripts/userpipe

Signed-off-by: lind <[email protected]>

* tests: remove graphs

Signed-off-by: lind <[email protected]>

* tests: remove data output files from ipc performance tests

Signed-off-by: lind <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>
Signed-off-by: lind <[email protected]>
Co-authored-by: lind <[email protected]>

* tests: unix bash pipelines (#354)

* tests: bash pipeline scripts

Signed-off-by: RusherRG <[email protected]>

* grep perf data

Signed-off-by: RusherRG <[email protected]>

* tests: chain of cats benchmark

Signed-off-by: RusherRG <[email protected]>

* tests: add scripts to benchmark coreutils pipelines on native and lind

Signed-off-by: RusherRG <[email protected]>

* update

Signed-off-by: RusherRG <[email protected]>

* tests: pipeline_tests cleanup

Signed-off-by: RusherRG <[email protected]>

* tests: reorganize pipeline-tests

Signed-off-by: RusherRG <[email protected]>

* tests: change extension of scripts

Signed-off-by: lind <[email protected]>

* tests: update pipeline_tests scripts

Signed-off-by: lind <[email protected]>

* tests: remove unnecessary files

Signed-off-by: lind <[email protected]>

* tests: update cat_bench.py

Signed-off-by: lind <[email protected]>

* tests: add README.md

Signed-off-by: lind <[email protected]>

* tests: add plotting scripts to pipeline_tests

Signed-off-by: lind <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>
Signed-off-by: lind <[email protected]>

* tests: lamp stack (#356)

* tests: lamp stack pgbench tests

Signed-off-by: RusherRG <[email protected]>

* tests: lamp stack profiling

Signed-off-by: RusherRG <[email protected]>

* tests: update lamp stack scripts

Signed-off-by: RusherRG <[email protected]>

* tests: fix lamp stack postgres queries

Signed-off-by: RusherRG <[email protected]>

* tests: chmod for lamp stack scripts

Signed-off-by: RusherRG <[email protected]>

* tests: lamp stack remove create.html

Signed-off-by: RusherRG <[email protected]>

* tests: native lamp stack updates

Signed-off-by: RusherRG <[email protected]>

* tests: make scripts executable

Signed-off-by: RusherRG <[email protected]>

* tests: add prints to pgbench run

Signed-off-by: RusherRG <[email protected]>

* tests: fixing lamp-stack tests and update sleep times

Signed-off-by: lind <[email protected]>

* tests: update nginx configuration

Signed-off-by: lind <[email protected]>

* tests: reformatting lamp stack tests

Signed-off-by: lind <[email protected]>

* tests: reformatting lamp stack tests

Signed-off-by: lind <[email protected]>

* tests: adding -O3 flag to postgres bootstrap_nacl

Signed-off-by: lind <[email protected]>

* tests: adding scripts for no postgres versions

Signed-off-by: lind <[email protected]>

* tests: update pgbench and profiling scripts

Signed-off-by: lind <[email protected]>

* tests: add no-flask test scripts

Signed-off-by: lind <[email protected]>

* tests: update no-flask test times

Signed-off-by: lind <[email protected]>

* tests: update flask app to restructure the data generation

Signed-off-by: lind <[email protected]>

* fix: nginx platform word size

Signed-off-by: lind <[email protected]>

* fix: use unix sockets for gunicorn

Signed-off-by: lind <[email protected]>

* feat: update pgbench scripts

Signed-off-by: lind <[email protected]>

* feat: add nginx only scripts

Signed-off-by: lind <[email protected]>

* feat: update lamp_stack scripts and files

Signed-off-by: lind <[email protected]>

* test: add scripts about select_accept

Signed-off-by: lind <[email protected]>

* tests: refactor pgbench tests

Signed-off-by: lind <[email protected]>

* tests: refactor profiling tests

Signed-off-by: lind <[email protected]>

* tests: refactor profiling select_accpet tests

Signed-off-by: lind <[email protected]>

* tests: update nginx scripts

Signed-off-by: lind <[email protected]>

* tests: add README.md and compile.sh to profiling

Signed-off-by: lind <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>
Signed-off-by: lind <[email protected]>

* tests: Unix domain sockets (#355)

* tests: formatting ipc_performance tests

Signed-off-by: RusherRG <[email protected]>

* uds ipc test and scripts

* removing prints

* push

* tests: reorganize uds ipc tests

Signed-off-by: RusherRG <[email protected]>

* tests: update uds ipc tests to support more than 1GB data

Signed-off-by: RusherRG <[email protected]>

* tests: uds native test str(total_size)

Signed-off-by: RusherRG <[email protected]>

* tests: uds plot scripts

Signed-off-by: RusherRG <[email protected]>

* tests: update uds ipc test

Signed-off-by: RusherRG <[email protected]>

* tests: adding -O3 to uds tests

Signed-off-by: lind <[email protected]>

* tests: updating uds script to uds_send_recv

Signed-off-by: lind <[email protected]>

* chore: remove unnecessary files

Signed-off-by: lind <[email protected]>

* tests: cleanup uds tests

Signed-off-by: lind <[email protected]>

* tests: add README.md and plot scripts in uds

Signed-off-by: lind <[email protected]>

* tests: remove data output files from uds

Signed-off-by: lind <[email protected]>

---------

Signed-off-by: RusherRG <[email protected]>
Signed-off-by: lind <[email protected]>
Co-authored-by: lind <[email protected]>

* Fix UDS tests after signal merge (#357)

* updating submodules to latest commits for Merge into main

---------

Signed-off-by: lind <[email protected]>
Signed-off-by: RusherRG <[email protected]>
Co-authored-by: lind <[email protected]>
Co-authored-by: Justin Koe <[email protected]>
Co-authored-by: Tian(Maxwell) Yang <[email protected]>
Co-authored-by: jesings <[email protected]>
Co-authored-by: Devansh Patel <[email protected]>
Co-authored-by: Rushang Gajjal <[email protected]>
Co-authored-by: Y. W <[email protected]>
Co-authored-by: kuzeyardabulut <[email protected]>
Co-authored-by: Keyur Panchal <[email protected]>
Co-authored-by: Yaxuan-w <[email protected]>
Co-authored-by: Mayank Ramnani <[email protected]>
Co-authored-by: Yashaswi Makula <[email protected]>
  • Loading branch information
13 people authored Mar 28, 2024
1 parent 0a55d4c commit 4f69dfd
Show file tree
Hide file tree
Showing 164 changed files with 132,231 additions and 153,623 deletions.
2 changes: 1 addition & 1 deletion src/lind-misc
Submodule lind-misc updated 0 files
2 changes: 1 addition & 1 deletion src/lind_glibc
Submodule lind_glibc updated 49 files
+35 −0 .github/pull_request_template.md
+1 −1 elf/Makefile
+20 −1 elf/Versions
+2 −2 elf/dl-load.c
+9 −2 make_sysd_rules.py
+50 −46 nptl/allocatestack.c
+9 −3 nptl/sem_destroy.c
+10 −7 nptl/sem_getvalue.c
+8 −20 nptl/sem_init.c
+0 −1 nptl/semaphore.h
+10 −25 nptl/sysdeps/unix/sysv/linux/sem_post.c
+8 −80 nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
+10 −12 nptl/sysdeps/unix/sysv/linux/sem_trywait.c
+10 −40 nptl/sysdeps/unix/sysv/linux/sem_wait.c
+1 −2 posix/setuid.c
+1 −1 sysdeps/nacl/access.c
+21 −0 sysdeps/nacl/alarm.c
+3 −3 sysdeps/nacl/close.c
+1 −1 sysdeps/nacl/fstatfs.c
+19 −1 sysdeps/nacl/ftruncate.c
+3 −3 sysdeps/nacl/fxstat.c
+1 −1 sysdeps/nacl/ifaddrs.c
+240 −180 sysdeps/nacl/irt_syscalls.c
+38 −21 sysdeps/nacl/irt_syscalls.h
+26 −1 sysdeps/nacl/kill.c
+0 −16 sysdeps/nacl/lind_lock.c
+0 −23 sysdeps/nacl/lind_lock.h
+36 −0 sysdeps/nacl/lindsetitimer.c
+6 −6 sysdeps/nacl/link.c
+0 −2 sysdeps/nacl/llseek.c
+3 −3 sysdeps/nacl/lxstat.c
+1 −1 sysdeps/nacl/mprotect.c
+1 −1 sysdeps/nacl/munmap.c
+20 −0 sysdeps/nacl/nacl_signal.h
+55 −15 sysdeps/nacl/nacl_syscalls.h
+4 −5 sysdeps/nacl/pread.c
+4 −5 sysdeps/nacl/pwrite.c
+4 −5 sysdeps/nacl/read.c
+4 −0 sysdeps/nacl/shmctl.c
+1 −1 sysdeps/nacl/shmdt.c
+78 −29 sysdeps/nacl/sigaction.c
+29 −54 sysdeps/nacl/sigprocmask.c
+3 −3 sysdeps/nacl/statfs.c
+173 −71 sysdeps/nacl/sysdep.h
+19 −0 sysdeps/nacl/truncate.c
+6 −6 sysdeps/nacl/unlink.c
+4 −5 sysdeps/nacl/write.c
+1 −1 sysdeps/nacl/xstat.c
+2 −4 sysdeps/unix/sysv/linux/sync_file_range.c
2 changes: 1 addition & 1 deletion src/nacl-binutils
2 changes: 1 addition & 1 deletion src/native_client
Submodule native_client updated 70 files
+35 −0 .github/pull_request_template.md
+2 −20 build/gyp_nacl
+119 −4 src/shared/platform/lind_platform.c
+87 −4 src/shared/platform/lind_platform.h
+21 −37 src/shared/platform/lind_stat.h
+9 −11 src/shared/platform/linux/nacl_host_dir.c
+5 −54 src/shared/platform/nacl_host_desc.h
+1 −3 src/shared/platform/nacl_host_dir_test.c
+67 −175 src/shared/platform/osx/nacl_host_dir.c
+55 −104 src/shared/platform/posix/nacl_host_desc.c
+2 −3 src/trusted/desc/metadata_test.c
+4 −15 src/trusted/desc/nacl_desc_io.c
+1 −2 src/trusted/desc/nacl_desc_io.h
+1 −3 src/trusted/desc/nacl_desc_quota_test.c
+3 −7 src/trusted/gio/gio_nacl_desc_test.c
+1 −1 src/trusted/service_runtime/arch/x86_32/nacl_switch_to_app_32.c
+35 −0 src/trusted/service_runtime/arch/x86_64/nacl_signal_64.h
+117 −0 src/trusted/service_runtime/arch/x86_64/nacl_sigreturn.S
+2 −1 src/trusted/service_runtime/arch/x86_64/nacl_switch_64.S
+29 −14 src/trusted/service_runtime/arch/x86_64/nacl_switch_to_app_64.c
+86 −1 src/trusted/service_runtime/arch/x86_64/nacl_syscall_64.S
+15 −0 src/trusted/service_runtime/arch/x86_64/sel_ldr_x86_64.c
+2 −0 src/trusted/service_runtime/arch/x86_64/sel_rt_64.h
+2 −0 src/trusted/service_runtime/arch/x86_64/tramp_64.h
+40 −0 src/trusted/service_runtime/build.scons
+1 −0 src/trusted/service_runtime/elf_util.c
+3 −0 src/trusted/service_runtime/include/bits/mman.h
+30 −7 src/trusted/service_runtime/include/bits/nacl_syscalls.h
+13 −0 src/trusted/service_runtime/include/sys/sigaction.h
+372 −27 src/trusted/service_runtime/linux/nacl_signal.c
+3 −1 src/trusted/service_runtime/linux/nacl_signal_64.c
+62 −23 src/trusted/service_runtime/linux/thread_suspension.c
+1 −2 src/trusted/service_runtime/load_file.c
+89 −155 src/trusted/service_runtime/nacl_app_thread.c
+8 −6 src/trusted/service_runtime/nacl_app_thread.h
+0 −8 src/trusted/service_runtime/nacl_copy.c
+4 −0 src/trusted/service_runtime/nacl_exception.h
+0 −1 src/trusted/service_runtime/nacl_globals.c
+1 −1 src/trusted/service_runtime/nacl_globals.h
+4 −0 src/trusted/service_runtime/nacl_signal.h
+78 −13 src/trusted/service_runtime/nacl_signal_common.c
+7 −0 src/trusted/service_runtime/nacl_switch_to_app.h
+1,671 −2,698 src/trusted/service_runtime/nacl_syscall_common.c
+58 −25 src/trusted/service_runtime/nacl_syscall_common.h
+25 −18 src/trusted/service_runtime/nacl_syscall_handlers_gen.py
+32 −5 src/trusted/service_runtime/nacl_syscall_hook.c
+975 −0 src/trusted/service_runtime/nacl_syscall_strace.c
+89 −0 src/trusted/service_runtime/nacl_syscall_strace.h
+6 −0 src/trusted/service_runtime/posix/sel_memory.c
+6 −0 src/trusted/service_runtime/sel_addrspace.c
+178 −256 src/trusted/service_runtime/sel_ldr.c
+4 −4 src/trusted/service_runtime/sel_ldr.h
+13 −12 src/trusted/service_runtime/sel_main.c
+128 −60 src/trusted/service_runtime/sel_mem.c
+16 −0 src/trusted/service_runtime/sel_mem.h
+11 −0 src/trusted/service_runtime/sel_mem_test.cc
+1 −0 src/trusted/service_runtime/sel_memory.h
+1 −0 src/trusted/service_runtime/service_runtime.gyp
+3 −0 src/trusted/service_runtime/thread_suspension.h
+1 −1 src/untrusted/irt/irt_sem.c
+1 −1 src/untrusted/nacl/syscall_bindings_trampoline.h
+2 −3 tests/minnacl/minimal_test_host.c
+1 −2 tests/multiple_sandboxes/multidomain_test_host.c
+0 −2 tests/signal_handler_single_step/regs_step_test_host.c
+0 −2 tests/signal_handler_single_step/step_test_host.c
+0 −2 tests/thread_capture/arch/arm/thread_capture_test_injection.c
+0 −2 tests/thread_capture/arch/mips/thread_capture_test_injection.c
+0 −2 tests/thread_capture/arch/x86_32/thread_capture_test_injection.c
+0 −2 tests/thread_capture/arch/x86_64/thread_capture_test_injection.c
+0 −2 tests/thread_suspension/suspend_test_host.c
1 change: 1 addition & 0 deletions src/scripts/nginx/load_nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
lindfs cp /home/lind/lind_project/lind/tmp/usr/local/nginx/ /usr/local/nginx
lindfs cp /home/lind/lind_project/lind/tmp/usr/local/nginx/sbin/nginx /bin/nginx
lindfs cp /home/lind/lind_project/src/scripts/nginx/nginx-conf/nginx.conf /usr/local/nginx/conf/nginx.conf
lindfs cp /home/lind/lind_project/src/scripts/nginx/nginx-conf/nginx_static.conf /usr/local/nginx/conf/nginx_static.conf
lindfs cp /home/lind/lind_project/src/scripts/nginx/sites/sites-available/myproject /etc/nginx/sites-available/myproject
lindfs cp /home/lind/lind_project/src/scripts/nginx/sites/sites-enabled/myproject /etc/nginx/sites-enabled/myproject
210 changes: 92 additions & 118 deletions src/scripts/nginx/nginx-conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,129 +1,103 @@
#user nobody;
worker_processes 1;

#error_log /home/lind/lind_project/fake_fs/var/logs/nginx/error.log debug;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

# user www-data;
worker_processes auto;
# pid /run/nginx.pid;
# include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 1024;
worker_connections 1024;
# multi_accept on;
}


http {
include mime.types;
#include /home/lind/lind_project/fake_fs/etc/nginx/sites-enabled/*.*;
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 /home/lind/lind_project/fake_fs/var/logs/nginx/access.log;

# sendfile on;
# #tcp_nopush on;
#
# #keepalive_timeout 0;
# keepalive_timeout 65;
#
# #gzip on;
##
# Basic Settings
##

sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

# ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /usr/local/nginx/logs/access.log;
error_log /usr/local/nginx/logs/error.log;

##
# Gzip Settings
##

# gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

# include /etc/nginx/conf.d/*.conf;
# include /etc/nginx/sites-enabled/*;
upstream app_server {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response

# for UNIX domain socket setups
server unix:/tmp/gunicorn.sock fail_timeout=0;

# for a TCP configuration
# server 192.168.0.7:8000 fail_timeout=0;
}

server {
listen 80;

location / {
proxy_buffering off;
proxy_pass http://app_server;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}

server {
listen 80;
#server_name myproject;

location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
#
# server {
# listen 80;
# server_name localhost;
#
# #charset koi8-r;
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# #access_log logs/host.access.log main;
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# location / {
# root html;
# index index.html index.htm;
# }
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# #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 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;
#}
# }


# 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;
# }
#}

}
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
104 changes: 104 additions & 0 deletions src/scripts/nginx/nginx-conf/nginx_static.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# user www-data;
worker_processes auto;
# pid /run/nginx.pid;
# include /etc/nginx/modules-enabled/*.conf;
daemon on;

events {
worker_connections 1024;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

# ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /usr/local/nginx/logs/access.log;
error_log /usr/local/nginx/logs/error.log;

##
# Gzip Settings
##

# gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

# include /etc/nginx/conf.d/*.conf;
# include /etc/nginx/sites-enabled/*;
upstream app_server {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response

# for UNIX domain socket setups
server unix:/tmp/gunicorn.sock fail_timeout=0;

# for a TCP configuration
# server 192.168.0.7:8000 fail_timeout=0;
}

server {
listen 80;

root /;
autoindex on;

location / {
try_files $uri $uri/ =404;
}
}
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Loading

0 comments on commit 4f69dfd

Please sign in to comment.