Created
February 13, 2025 13:28
-
-
Save zeegin/eb493b5a18594f5f4fa46e22094a642d to your computer and use it in GitHub Desktop.
nginx.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 3600; | |
gzip on; | |
server { | |
listen 8080; | |
server_name zeegin.com; | |
# server_tokens off; | |
client_max_body_size 4096M; | |
location / { | |
root html; | |
try_files $uri $uri/ =404; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
location = /basic_status { | |
stub_status; | |
allow 127.0.0.1; | |
allow ::1; | |
deny all; | |
} | |
location /instance { | |
proxy_pass http://127.0.0.1:52001; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $host:$server_port; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set httpd="C:\services\httpd\bin\httpd.exe" | |
%httpd% -k stop -n "Apache 1c instance" | |
%httpd% -k uninstall -n "Apache 1c instance" | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set httpd="C:\services\httpd\bin\httpd.exe" | |
%httpd% -k install -n "Apache 1c instance" -f "C:\services\httpd-instances\instance\public\httpd.conf" | |
%httpd% -k start -n "Apache 1c instance" | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Define SERVECEROOT "C:\services\httpd-instances" | |
Define PLATFORMMODULE "C:\Program Files\1cv8\current\bin\wsap24.dll" | |
################################################################################## | |
Define SERVICENAME "instance" | |
Define SERVICEPORT 52001 | |
################################################################################## | |
LoadModule authz_core_module modules/mod_authz_core.so | |
LoadModule dir_module modules/mod_dir.so | |
LoadModule _1cws_module "${PLATFORMMODULE}" | |
LoadModule log_config_module modules/mod_log_config.so | |
LoadModule status_module modules/mod_status.so | |
PidFile "${SERVECEROOT}\${SERVICENAME}\public\httpd.pid" | |
Listen "${SERVICEPORT}" | |
ServerName localhost | |
KeepAlive off | |
<Location "/${SERVICENAME}"> | |
Options None | |
Require all granted | |
SetHandler 1c-application | |
ManagedApplicationDescriptor "${SERVECEROOT}\${SERVICENAME}\public\default.vrd" | |
</Location> | |
<Location "/${SERVICENAME}/server-status"> | |
SetHandler server-status | |
Require all granted | |
</Location> | |
ErrorLog "${SERVECEROOT}\${SERVICENAME}\logs\error.log" | |
LogLevel warn | |
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined | |
LogFormat "%h %l %u %t \"%r\" %>s %b" common | |
CustomLog "${SERVECEROOT}\${SERVICENAME}\logs\access.log" common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if /%1 == / goto help | |
pushd "C:\Program Files\1cv8" | |
if exist current\ rmdir current | |
mklink /j current %1 | |
popd | |
goto end | |
:help | |
echo SetCurrent1CVersion - Makes symbolic links pointing to current 1C-Enterprise version's folders | |
echo Parameter: 1C-Enterprise version number | |
echo Example: SetCurrent1CVersion 8.3.18.1208 | |
:end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment