lide-reed / apache2nginx Goto Github PK
View Code? Open in Web Editor NEWA command line tool, which can be used to generate nginx config file according to given config files of Apache
License: Apache License 2.0
A command line tool, which can be used to generate nginx config file according to given config files of Apache
License: Apache License 2.0
possible duplicate of #3
trying to process the following config file on Ubuntu 18.04 with commit 7b590f7 (newest commit as of writing, 2019-09-28), results in a segfault, strace at bottom,
config file:
# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
# Alias /roundcube /var/lib/roundcube
<Directory /var/lib/roundcube/>
Options +FollowSymLinks
# This is needed to parse /var/lib/roundcube/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
# Protecting basic directories:
<Directory /var/lib/roundcube/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/lib/roundcube/temp>
Options -FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Deny from all
</IfVersion>
</Directory>
<Directory /var/lib/roundcube/logs>
Options -FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Deny from all
</IfVersion>
</Directory>
strace:
execve("./a2n", ["./a2n", "-f", "/etc/apache2/conf-available/roun"...], 0x7fffffffe5a0 /* 21 vars */) = 0
brk(NULL) = 0x5555558aa000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = 0
openat(AT_FDCWD, "/etc/ld.so.preload", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
mmap(NULL, 41, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x7ffff7ff6000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libeatmydata.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\7\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=10080, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7ff4000
mmap(NULL, 2105384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff7bd2000
mprotect(0x7ffff7bd3000, 2097152, PROT_NONE) = 0
mmap(0x7ffff7dd3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7ffff7dd3000
close(3) = 0
munmap(0x7ffff7ff6000, 41) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=45800, ...}) = 0
mmap(NULL, 45800, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fe8000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\37\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=116960, ...}) = 0
mmap(NULL, 2212016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff79b5000
mprotect(0x7ffff79d1000, 2093056, PROT_NONE) = 0
mmap(0x7ffff7bd0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7ffff7bd0000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\272\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1700792, ...}) = 0
mmap(NULL, 3789144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff7617000
mprotect(0x7ffff77b4000, 2093056, PROT_NONE) = 0
mmap(0x7ffff79b3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19c000) = 0x7ffff79b3000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@8\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=202880, ...}) = 0
mmap(NULL, 2298016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff73e5000
mprotect(0x7ffff7414000, 2097152, PROT_NONE) = 0
mmap(0x7ffff7614000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2f000) = 0x7ffff7614000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\"\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31680, ...}) = 0
mmap(NULL, 2128864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff71dd000
mprotect(0x7ffff71e4000, 2093056, PROT_NONE) = 0
mmap(0x7ffff73e3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ffff73e3000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=39208, ...}) = 0
mmap(NULL, 2322976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff6fa5000
mprotect(0x7ffff6fae000, 2093056, PROT_NONE) = 0
mmap(0x7ffff71ad000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7ffff71ad000
mmap(0x7ffff71af000, 184864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffff71af000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000b\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=144976, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7fe6000
mmap(NULL, 2221184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff6d86000
mprotect(0x7ffff6da0000, 2093056, PROT_NONE) = 0
mmap(0x7ffff6f9f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7ffff6f9f000
mmap(0x7ffff6fa1000, 13440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffff6fa1000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14560, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff6b82000
mprotect(0x7ffff6b85000, 2093056, PROT_NONE) = 0
mmap(0x7ffff6d84000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ffff6d84000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2030544, ...}) = 0
mmap(NULL, 4131552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff6791000
mprotect(0x7ffff6978000, 2097152, PROT_NONE) = 0
mmap(0x7ffff6b78000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7ffff6b78000
mmap(0x7ffff6b7e000, 15072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffff6b7e000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7fe4000
arch_prctl(ARCH_SET_FS, 0x7ffff7fe4c00) = 0
mprotect(0x7ffff6b78000, 16384, PROT_READ) = 0
mprotect(0x7ffff6d84000, 4096, PROT_READ) = 0
mprotect(0x7ffff6f9f000, 4096, PROT_READ) = 0
mprotect(0x7ffff71ad000, 4096, PROT_READ) = 0
mprotect(0x7ffff73e3000, 4096, PROT_READ) = 0
mprotect(0x7ffff7614000, 8192, PROT_READ) = 0
mprotect(0x7ffff79b3000, 4096, PROT_READ) = 0
mprotect(0x7ffff7bd0000, 4096, PROT_READ) = 0
mprotect(0x7ffff7dd3000, 4096, PROT_READ) = 0
mprotect(0x555555898000, 24576, PROT_READ) = 0
mprotect(0x7ffff7ffc000, 4096, PROT_READ) = 0
munmap(0x7ffff7fe8000, 45800) = 0
set_tid_address(0x7ffff7fe4ed0) = 4765
set_robust_list(0x7ffff7fe4ee0, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7ffff6d8bcb0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7ffff6d98890}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7ffff6d8bd50, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7ffff6d98890}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
futex(0x7ffff6d850c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(NULL) = 0x5555558aa000
brk(0x5555558cb000) = 0x5555558cb000
brk(0x5555558ed000) = 0x5555558ed000
brk(0x55555590f000) = 0x55555590f000
lstat("/etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/apache2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/apache2/conf-available", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/apache2/conf-available/roundcube.conf", {st_mode=S_IFLNK|0777, st_size=26, ...}) = 0
readlink("/etc/apache2/conf-available/roundcube.conf", "/etc/roundcube/apache.conf", 4095) = 26
lstat("/etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/roundcube", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/roundcube/apache.conf", {st_mode=S_IFREG|0644, st_size=1240, ...}) = 0
lstat("/etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/roundcube", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/etc/roundcube/apache.conf", {st_mode=S_IFREG|0644, st_size=1240, ...}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x558aeb68} ---
+++ killed by SIGSEGV (core dumped) +++
Is there a way to convert the apache main configuration file and every conf file in the sites-available folder?
Segmentation fault (core dumped) when running apache2nginx -f /var/apache2/conf/httpd.conf
Solution:
==>
listen _:80 default_server;
==>
listen * default_server;
"Segmentation fault (core dumped)" when running apache2nginx -f /var/apach2/conf/httpd.conf
The current binaries do not work on MacOS Catalina. However, if built from source, it works perfectly.
This file has a working binary for MacOS Catalina.
Zip file hashes:
MD5: 73BFE607FF73BB3567EBD2DAF53570D6
SHA1: 94DCCD32C8B49D9397FBAA3EF267F715B56A4530
SHA256: 3DD1E97029AAD30F696EB6D89818B5D616EB98FA082AAA104C6870DEEBDCDBDC
I submitted a simple Gentoo Linux ebuild at https://bugs.gentoo.org/show_bug.cgi?id=571050
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.