termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

Apache2 HTTPS problem

Open IRISnoir opened this issue 6 years ago • 17 comments

Hello, I am trying to configure Apache2 to run through SSL. But when I try to enable the 'Include httpd-ssl.conf' in the main httpd.conf file and run it. It says:

AH00526: Syntax error on line 52 of /data/data/com.termux/files/usr/etc/apache2/extra/httpd-ssl.conf: Invalid command 'SSLCipherSuite', perhaps misspelled or defined by a module not included in the server configuration

Can you tell me if I'm doing something wrong or if you need more info

IRISnoir avatar Sep 08 '19 10:09 IRISnoir

Uncomment the LoadModule line for ssl_module (and apparently, socache_shmcb_module) in httpd.conf.

tomty89 avatar Sep 09 '19 13:09 tomty89

It says: "Segmentation fault". I think the source of this is because of mod_ssl

IRISnoir avatar Sep 09 '19 13:09 IRISnoir

Hmm, I am not getting segfault here (though I stopped at the point where it asks for a cert).

Post the output of termux-info, perhaps?

tomty89 avatar Sep 09 '19 14:09 tomty89

Updatable packages: All packages up to date Subscribed repositories: https://dl.bintray.com/xeffyr/x11-packages-21 x11/main https://dl.bintray.com/xeffyr/unstable-packages-21 unstable/main https://dl.bintray.com/grimler/science-packages-21 science/stable https://dl.bintray.com/grimler/termux-root-packages-21 root/stable https://dl.bintray.com/grimler/game-packages-21 games/stable https://termux.net stable/main https://termux.net stable/main System information: Linux localhost 3.10.72 #1 SMP PREEMPT Tue Feb 16 18:23:49 CST 2016 armv7l Android Termux-packages arch: arm Android version: 5.1 Device manufacturer: Lenovo Device model: Lenovo TB3-710I

IRISnoir avatar Sep 09 '19 14:09 IRISnoir

Also, I am certain that the source of segfault is due to mod_ssl. When I remove it, the command works perfectly fine.

IRISnoir avatar Sep 09 '19 14:09 IRISnoir

Probably an android-5 and/or arm issue. httpd starts fine here (master / aarch64) after I provide it with a cert and a key. @xeffyr?

tomty89 avatar Sep 09 '19 15:09 tomty89

I just set up an android-5/arm prefix on my aarch64 Android 8.0 device and cannot reproduce the problem. Perhaps it has something to do with your ROM/device specifically. We might need you to debug apache on it to get some hint on what exactly the problem is.

tomty89 avatar Sep 10 '19 18:09 tomty89

What is the gdb command again?

IRISnoir avatar Sep 10 '19 23:09 IRISnoir

Here is the gdb output:

Starting program: /data/data/com.termux/files/usr/bin/httpd warning: .dynamic section for "/system/lib/libexpat.so" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/system/lib/libpcre.so" is not at the expected address (wrong library or version mismatch?) warning: Could not load shared library symbols for mod_mpm_worker.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_authn_file.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_authn_core.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_authz_host.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_authz_groupfile.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_authz_user.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_authz_core.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_access_compat.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_auth_basic.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_socache_shmcb.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_reqtimeout.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_include.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_filter.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_mime.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_log_config.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_env.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_headers.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_setenvif.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_version.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_slotmem_shm.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_ssl.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_unixd.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_status.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_autoindex.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_negotiation.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_dir.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_userdir.so. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for mod_alias.so. Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGSEGV, Segmentation fault. 0xb6cbb4a4 in ?? ()

IRISnoir avatar Sep 11 '19 15:09 IRISnoir

Here is the gdb output:

That output is not interesting. You need to try obtain backtrace. Execute something like

gdb /data/data/com.termux/files/usr/bin/httpd
run
bt

ghost avatar Sep 11 '19 16:09 ghost

bt says 'No stack'

IRISnoir avatar Sep 11 '19 23:09 IRISnoir

httpd: Syntax error on line 535 of /data/data/com.termux/files/usr/etc/apache2/httpd.conf: Include/IncludeOptional: No matches for the wildcard '*.conf' in '/data/data/com.termux/files/usr/etc/apache2/conf.d', failing when I run apache2 it show. ❓ how fix it?

navnee123 avatar Sep 16 '20 16:09 navnee123

@navnee123 Just comment this line.

ghost avatar Sep 17 '20 12:09 ghost

@navnee123 Just comment this line.

Include etc/apache2/conf.d/*.conf This is the line. 535

navnee123 avatar Sep 17 '20 13:09 navnee123

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 18 '21 18:11 stale[bot]

Hi. Sorry I commented on old thread, I encounter same problem and have gdb log $ gdb /data/data/com.termux/files/usr/bin/httpd GNU gdb (GDB) 8.3.1 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-androideabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /data/data/com.termux/files/usr/bin/httpd... (No debugging symbols found in /data/data/com.termux/files/usr/bin/httpd) (gdb) run Starting program: /data/data/com.termux/files/usr/bin/httpd warning: .dynamic section for "/system/lib/libexpat.so" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/system/lib/libz.so.1" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/system/lib/libfreetype.so" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/system/lib/libjpeg.so" is not at the expected address (wrong library or version mismatch?) warning: .dynamic section for "/system/lib/libcurl.so" is not at the expected address (wrong library or version mismatch?) warning: Could not load shared library symbols for libphp7.so. Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGILL, Illegal instruction. 0xb56bb346 in ?? () from /data/data/com.termux/files/usr/lib/libcrypto.so.1.1 (gdb) bt #0 0xb56bb346 in ?? () from /data/data/com.termux/files/usr/lib/libcrypto.so.1.1 #1 0xb56bb24c in ?? () from /data/data/com.termux/files/usr/lib/libcrypto.so.1.1 Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb)

Here is termux-info $ termux-info find: ‘/data/data/com.termux/files/usr/etc/apt/sources.list.d’: No such file or directory Packages CPU architecture: arm Subscribed repositories:

sources.list

deb https://packages-cf.termux.dev/apt/termux-main-21 stable main Updatable packages: All packages up to date Android version: 5.0 Kernel build information: Linux localhost 3.10.0+ #3 SMP PREEMPT Wed May 29 14:52:21 CST 2019 armv7l Android Device manufacturer: unknown Device model: PDI350UFP01

RaidenX5 avatar Jun 08 '24 03:06 RaidenX5

Is this problem still reproducible?

twaik avatar Jul 29 '24 08:07 twaik