termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.18k stars 3.02k forks source link

Apache2 HTTPS problem #4272

Open IRISnoir opened 5 years ago

IRISnoir commented 5 years ago

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

tomty89 commented 5 years ago

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

IRISnoir commented 5 years ago

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

tomty89 commented 5 years ago

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?

IRISnoir commented 5 years ago

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 commented 5 years ago

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

tomty89 commented 5 years ago

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 commented 5 years ago

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.

IRISnoir commented 5 years ago

What is the gdb command again?

IRISnoir commented 5 years ago

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 ?? ()

ghost commented 5 years ago

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
IRISnoir commented 5 years ago

bt says 'No stack'

navnee123 commented 4 years ago

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?

ghost commented 4 years ago

@navnee123 Just comment this line.

navnee123 commented 4 years ago

@navnee123 Just comment this line.

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

stale[bot] commented 2 years ago

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.

RaidenX5 commented 4 months ago

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

twaik commented 2 months ago

Is this problem still reproducible?