Comments (14)
from apache2buddy.
Sure
VERBOSE: Adding glob to /etc/apache2/vhosts/, is a directory
VERBOSE: Adding /etc/apache2/vhosts/user1: to list of files for processing
VERBOSE: Adding family.user1.com to list of files for processing
VERBOSE: Adding thai.user1.com to list of files for processing
VERBOSE: Adding valery.user1.com to list of files for processing
VERBOSE: Adding to list of files for processing
VERBOSE: Adding /etc/apache2/vhosts/user2: to list of files for processing
................
VERBOSE: Processing /etc/apache2/vhosts/user1:
Uncaught exception from user code:
Unable to open file: /etc/apache2/vhosts/user1:
main::find_included_files(ARRAY(0x1830b60), ARRAY(0x18312b0), "/etc/apache2") called at ./apache2buddy.pl line 314
main::build_config_array("/etc/apache2/apache2.conf", "/etc/apache2") called at ./apache2buddy.pl line 1586
main::preflight_checks() called at ./apache2buddy.pl line 2032
from apache2buddy.
from apache2buddy.
from apache2buddy.
from apache2buddy.
Thinking I need to check each expanded file to see if it is either a file or a directory then decide
directory = dont add to array
file = add to array
at the moment:
VERBOSE: Adding /etc/apache2/vhosts/user1: to list of files for processing = WRONG IS DIRECTORY
VERBOSE: Adding family.user1.com to list of files for processing = @EXPECTING /etc/apache2/vhosts/user1/family.user1.com
VERBOSE: Adding thai.user1.com to list of files for processing = EXPECTNG /etc/apache2/vhosts/user1/thai.user1.com
VERBOSE: Adding valery.user1.com to list of files for processing = EXPECTNG /etc/apache2/vhosts/user1/valery.user1.com
VERBOSE: Adding to list of files for processing - NOT SURE WHY THIS IS EMPTY STRING
VERBOSE: Adding /etc/apache2/vhosts/user2: to list of files for processing = WRONG IS DIRECTORY
from apache2buddy.
Just figured out that **/*
is not enough here, if I add another folder inside user1 it won't work. :( And it skips files inside folder we're inspecting, prints only files in subfolders.
I think it's better to use something like find /etc/apache2/vhosts/
instead of ls
, it prints all files recursively. Just need to skip all directories.
About errors:
ls dir/*
output (":" after directory name):
SUBFOLDER:
file1 file2 file3
(empty string here)
SUBFOLDER2:
P.S.
from apache2buddy.
Include lines are:
Include conf.d/
Include vhosts-default/
Include vhosts/
Then it's user under vhosts
and separate config for each vhost inside user folder.
That's the way latest ISPManager panel organizes it's vhosts (pretty nice panel btw).
from apache2buddy.
from apache2buddy.
Why is it broken? Apache starts and every vhost works.
https://httpd.apache.org/docs/2.4/mod/core.html#include
Shell-style (fnmatch()) wildcard characters can be used in the filename or directory parts of the path to include several files at once, in alphabetical order. In addition, if Include points to a directory, rather than a file, Apache httpd will read all files in that directory and any subdirectory.
It's not recommended only because of "it is easy to accidentally leave temporary files" and apache won't start at all in this case. But anyway, it's a documented feature.
ls
output breaks your code if there're more directories under.
As I said before it's managed by web hosting panel (ISPManager) that way. :) It's pretty popular in Russia and Eastern Europe.
from apache2buddy.
from apache2buddy.
Still, it's possible, it's documented and it's used that way in many cases.
I understand that for some reason this bug have never been discovered (submitted?) for all project time being. So it's your decision whether to consider this case or not. All this long code with globs with dir/*
(not dir/*.conf
as recommended) could just be find dir/
, it's universal solution.
You you just don't have time I can prepare and send you PR with this change. Is it worth it?
from apache2buddy.
from apache2buddy.
from apache2buddy.
Related Issues (20)
- Plans to Support AlmaLinux 8.x and CloudLinux 7.9? HOT 5
- AmazonLinux Docker: Cannot find the 'hostname' executable. HOT 2
- AmazonLinux [ !! ] Python scripting failed. Python requires package 'distro' or 'platform' to determine the Operating System and Version. HOT 6
- Newer versions of python throw deprecation warnings HOT 5
- [ LOW PRIORITY ] Unable to detect apache on nonstandard ports - EOL Ubunutu 1604 with --skip-os-version-check HOT 1
- SS support along with netstat HOT 10
- Apache2buddy does not find apache on bitnami installation HOT 10
- --- a2bchk.sh --- showing MD5 mismatch HOT 4
- Add support for Ubuntu 22.04 HOT 8
- Add tests for ansible playbook in all Jenkins stages HOT 1
- Debian 12 support
- Running ISPconfig on ARM64: Bullseye with Linux 5.10.110-rockchip-rk3588: uninitialized value $apache_proc_php in concatenation (.) or string at - line 2524 (#1) HOT 1
- sub detect_php_memory_limit has hardcoded php executable path
- Support for Oracle Linux Server HOT 1
- Error: Illegal division by zero at line 987 HOT 4
- Support for SLES 12 with worker MPM HOT 1
- including Gentoo
- sub get_php_setting breaks on systems with multiple versions of php installed HOT 1
- Use of uninitialized value $apache_proc_php in string eq HOT 1
- DeprecationWarning: distro.linux_distribution() is deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apache2buddy.