apache2

How to configure SVN to show a collection of repositories

家住魔仙堡 提交于 2021-02-11 12:33:50
问题 I want to show a collection of all repositories using mod_authz_svn. When I access it, I get a 403 error (forbidden). I found out it works fine, when not specifying AuthzSVNAccessFile /etc/apache2/dav_svn.authz , and I am seeing all my repositories, but permissions (of course) don't work anymore. Is it even possible to show a collection of repositories while using AuthzSVNAccessFile ? This is my dav_svn.authz : [groups] admin = me users = you,others [/] * = r @admin = rw [repo:/subfolder]

Vagrant: Getting connecting clients real ip

别说谁变了你拦得住时间么 提交于 2021-02-10 20:17:38
问题 I have a simple Apache+Flask website running inside a basic Vagrant+VirtualBox environment. I can access my site fine at 127.0.0.1:8080. The question & problem is, how do I configure Vagrant to pass the real clients IP address to Apache+Flask? request.remote_addr always returns 10.0.2.2 no matter what client is connecting from within my LAN. For example the machine running Vagrants IP is 192.168.1.5. From a client i.e. another laptop on my LAN with IP of 192.168.1.7, would hit the site @ 192

Php include() proper Mime-types

╄→尐↘猪︶ㄣ 提交于 2021-02-10 15:56:43
问题 TLDR: I'm looking for a way to serve web resources (css, jpg, etc) from the filesystem that preserves mime-type. I am creating a php wrapper that validates a user from another domain (via a one time token), creates a session and then serves files, several websites in separate directories, inside of a otherwise in accesable directory to that user. I have, so far, used php to handle validation and mod_rewrite to redirect all requests for anything inside of the directory through the wrapper

Stopping Apache2 is much slower when overriding ENTRYPOINT in Docker

こ雲淡風輕ζ 提交于 2021-02-08 10:53:35
问题 I'm containerizing a PHP application and would like to modify the Apache configuration based on environment variables. This is done in a script overriding the default ENTRYPOINT : FROM php:7.2-apache # ... COPY prepare-docker-configs.sh . RUN chmod +x prepare-docker-configs.sh ENTRYPOINT ./prepare-docker-configs.sh After those modifications, Apache doesn't start. apache2-foreground seems to be the missing command, so I run it at the end of prepare-docker-configs.sh #!/bin/bash # ... Some

Stopping Apache2 is much slower when overriding ENTRYPOINT in Docker

末鹿安然 提交于 2021-02-08 10:52:09
问题 I'm containerizing a PHP application and would like to modify the Apache configuration based on environment variables. This is done in a script overriding the default ENTRYPOINT : FROM php:7.2-apache # ... COPY prepare-docker-configs.sh . RUN chmod +x prepare-docker-configs.sh ENTRYPOINT ./prepare-docker-configs.sh After those modifications, Apache doesn't start. apache2-foreground seems to be the missing command, so I run it at the end of prepare-docker-configs.sh #!/bin/bash # ... Some

http to https redirection using .htaccess not working

烂漫一生 提交于 2021-02-08 07:00:59
问题 I want to redirect http://myip/admin to https://myip/admin. I am trying to use .htaccess to do this (want this only for the admin folder). Contents of .htaccess placed in the relevant folder: RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} (apache mod_rewrite is enabled). Both http://myip/admin and https://myip/admin are visible (but the redirection does not work). Server is Ubuntu. I have tried few variations of the above rules from the internet

PHP Files won't open in browser - only download. What do I need to change to make it work properly?

血红的双手。 提交于 2021-02-07 18:16:21
问题 I have tried reinstalling PHP. PHP is working, and Apache2 is running. I don't know why it's not opening in a browser and displaying normally. Just so you know - my httpd.conf is empty - and instead I have everything in apache2.conf. This is because I'm using Ubuntu. Can you help me? I know it's something simple, but I can't seem to find the answer. 回答1: Have you virtual host on this project? Are you open php file with http://localhost/file.php or directly like file://...../file.php ? 回答2: In

PHP Files won't open in browser - only download. What do I need to change to make it work properly?

落花浮王杯 提交于 2021-02-07 18:16:17
问题 I have tried reinstalling PHP. PHP is working, and Apache2 is running. I don't know why it's not opening in a browser and displaying normally. Just so you know - my httpd.conf is empty - and instead I have everything in apache2.conf. This is because I'm using Ubuntu. Can you help me? I know it's something simple, but I can't seem to find the answer. 回答1: Have you virtual host on this project? Are you open php file with http://localhost/file.php or directly like file://...../file.php ? 回答2: In

PHP Files won't open in browser - only download. What do I need to change to make it work properly?

戏子无情 提交于 2021-02-07 18:15:25
问题 I have tried reinstalling PHP. PHP is working, and Apache2 is running. I don't know why it's not opening in a browser and displaying normally. Just so you know - my httpd.conf is empty - and instead I have everything in apache2.conf. This is because I'm using Ubuntu. Can you help me? I know it's something simple, but I can't seem to find the answer. 回答1: Have you virtual host on this project? Are you open php file with http://localhost/file.php or directly like file://...../file.php ? 回答2: In

php_admin_value disable_functions not working

故事扮演 提交于 2021-02-07 18:11:49
问题 I'm trying to disable functions, in my apache2 config file, but it's not working for some reason. I've verified that other php_admin_value settings ARE working, but it's just ignoring disable_functions Here's what I have: <Directory "/var/www/testdir/*"> php_admin_value open_basedir "/var/www/testdir" php_admin_value disable_functions "exec,shell_exec" </Directory> The open_basedir admin value is working as expected (cannot include '../something'), but yet, it will still exec ls -a .. or let