Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [apache2]

Apache (HTTP Server) /əˈpætʃiː/ is a modular cross-platform web server software with a large variety of features(called modules) including SSL, compression, log, proxy and server-side programming language interfaces like Perl, Python, Tcl, and PHP.

1
vote
1answer
11 views

Don't allow access to example.com/image/pic.jpg using htaccess

I have two domains for the same website. example.com and example2.com . I don't want the /image/pic.jpg to be accessible for the example.com It means, if someone try to visit example.com/image/pic....
2
votes
1answer
35 views

HTTP/2.0 loads resources in parallel, will that change dependency order of CSS and JS in my HTML source code?

I'm willing to use HTTP/2.0 on my apache server. I'm using apache over HTTP/1.1 and I have structured my site like this : <head> sharedJS.js 1.js 2.js sharedCSS.css 1.css 2.css </head> ...
1
vote
0answers
27 views

HSTS and redirecting to www. sub domain

I am trying to setup HSTS for my website but running into some problems regarding the response headers and the use of a sub domain. What I would like is for all HTTP traffic to redirect to https://www....
-1
votes
1answer
23 views

How to hide file extensions in the URL without removing them from HTML? (Apache2)

I'm quite new to hosting a website, so bear with me. I get that I can remove file extensions with the rewrite module. However, the ones that I've found requires me to also remove the extension in my ...
2
votes
1answer
55 views

http to https redirect triggers “Duplicate without user-selected canonical”

For some reason, my Main URL (https://www.foxteller.com) cannot be indexed because of my domain redirects in the apache2 config. My redirects go as follows: http://foxteller.com/ > https://www....
1
vote
1answer
45 views

Redirect from www and http to https doesn't work on sub-domains

I am trying to redirect all www and non-https requests to the HTTPS only versions with Apache server. I don't need or want www or non SSL URLs at all. The issue is that with the 2 different snippets ...
1
vote
1answer
31 views

How is the mapping done from …/script.php?one,1 to …/script/one/2?

There is a PHP script which evaluates one or two parameters via QUERY_STRING. This script should process the parameters via QUERY_PATH. The PHP file type should be omitted. Request of the form https:/...
2
votes
0answers
27 views

Can I check for thumbnail existence with RewriteCond !-f and have my controller create files that don't exist?

My team have an application written in PHP. Most requests are rewritten to our index.php file using the condition below, in the Apache .conf RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /...
1
vote
0answers
21 views

Temporarily turn off redirects on all virtualhosts

Is there a configuration parameter I can set in the global configuration to disable redirects in all virtual hosts? I've got a server with a bunch of virtual hosts with varying configurations, many ...
1
vote
0answers
51 views

Apache FilesMatch to deny access to all “.config” files is working except for web.config

In my apache server I don't want to serve any files with extensions .config because it could contain potentially sensitive information. In my apache2.conf file I added: <FilesMatch "\.config"> ...
1
vote
1answer
57 views

VirtualHosts Not Working - Apache - CentOS 6

I have a VPS that has a web app on it and a website. The web app and the website have separate cPanels. Default root directory for web app is: /home/webapp/public_html Default root directory for ...
2
votes
2answers
52 views

Installing WordPress with /wp path leads to redirect loop when index.html redirects to a shopping cart

So on my site, my shopping cart is located at example.com/zc2 I use this .htaccess file RewriteEngine On Redirect /index.html example.com/zc2/ So that anyone that lands on example.com will be ...
1
vote
1answer
34 views

Site works ok on HTTP, not on HTTPS

I have the following on sites-enabled: 000-default.conf default-ssl.conf 000-default.conf has: <VirtualHost *:80> ServerName www.optonet.inter.edu ServerAdmin webmaster@opto.inter.edu ...
1
vote
1answer
62 views

301 Redirect Issues in Apache Virtual Host

I've got a site with SSL (Certbot) enabled and so I've setup my 301 redirects in the /etc/apache2/sites-available/example.com-le-ssl.conf file. I did it this way since the non-ssl virtual host (:80) ...
0
votes
1answer
31 views

Apache2 failed to restart because of address already in use

Whenever I try to restart my apache2 service it shows an error like this: service apache2 restart Job for apache2.service failed because the control process exited with error code. See "systemctl ...
2
votes
1answer
45 views

Open website with subdirectory blocked by ip address?

I'm trying to block a subdirectory on my website that is open to the public. Nothing I've tried has been successful. Is this section from my conf enough to determine what's wrong? This is on Apache 2....
0
votes
0answers
473 views

Running test Python script under Apache 2.4 gives error “end of script output before headers”

I am trying to get a simple web service running on my local computer. In my cgi-bin directory in the Apache24 folder I added an empty file called pywps.cgi with the following content #!C:\ProgramData\...
1
vote
1answer
43 views

SSL certificate working fine for normal website but get certificate error when proxying requests through Apache to another application

I have just installed an SSL certificate on my webserver which is working fine for multiple subdomains without any issue. I then have a particular subdomain which receives a request through Apache ...
1
vote
1answer
31 views

My Apache log file has nothing but “combinedio” on each line

I tried to view my Apache2 log with the following command: sudo tail -100 /usr/local/apache2/logs/thewebsitename.log and all it returned were 100 lines saying "combinedio" on each line. How can I ...
2
votes
1answer
985 views

How to change challenge from tls-sni-01 to webroot for existing letsencrypt certificate?

I'm trying to renew my certificate that is due to expire. I used the apache plugin for certbot like this: sudo certbot --apache -d support.example.com. However, when I try to renew it now it uses tls-...
0
votes
0answers
217 views

Setup port-based virtualhost on WHM/cPanel environment?

I have root access on the following environment: Bluehost VPS - WHM 70, CentOS 6.1(kvm), Apache2.4(EasyApache4) /SSL enabled Bluehost cPanel seems to indicate deprecating adding a rails app function, ...
0
votes
1answer
274 views

HTTPS - HTTP communication on the same server

There is a server. On the server is apache. Apache has certificates. On the apache is a website - client, thanks to certificates the client is accessible by https://example.com/~path. The client is ...
4
votes
2answers
448 views

Rewrite all URLs within subdirectory to index.html so JavaScript can use the path

I have a part of domain example.com/~mypart. In that folder is index.html. If I visit example.com/~mypart/something I get a "Not Found" error. I want every address with some string after example.com/...
4
votes
1answer
69 views

Apache2: Require directive not working

I'm a tad confused after reading these docs: https://httpd.apache.org/docs/2.4/sections.html https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html I wrote this site definition: $ cat /etc/...
2
votes
0answers
65 views

How to hyperlink to file stored on local intranet via Windows share (SMB)?

We're deploying OSticket (uses Apache 2.4 & PHP-7.0-fpm) and want to hyperlink to network shared files (eg \\servername\foo) But this proves to be very difficult as this file is not in the webroot ...
4
votes
1answer
254 views

How to use rewrite rule to create exception rule for https redirection for directory ./well-known

Here is my situation: Server A: support.example.com -> port 80 is forwarded to this server Server B: hr.example.com Both are running apache2. For server B I want to use Let's encrypt. I want to ...
2
votes
1answer
35 views

Individual directory options for every VirtualHost in Apache2

I have a Debian 9 server with two static IPv4 addresses. One of them is public and the other one is in the server's VPN subnet (the machine is running an OpenVPN server). There is a DNS server in the ...
3
votes
2answers
280 views

Multiple PHP versions on one Digital Ocean droplet

Is there an easy way of using multiple php versions on one single digital ocean droplet. Basically, I want something like what we have for cPanel (https://documentation.cpanel.net/display/68Docs/...
0
votes
1answer
111 views

Accessing phpmyadmin on ec2 leads to “This site can’t provide a secure connection”

i run a single aws ec2 instance (apache2) behind an elb which gives me a free ssl cert from amazon. I have redirected all port 80 traffic to 443 in config and everything runs smoothly. But, when i ...
3
votes
1answer
2k views

500 internal server error when trying to implement reverse proxy under Apache. How do I forward the requests to another server without errors?

I want to forward a request from one server to another. Here is my problem: hr.example.com - port 80 - Server A support.example.com - port 80 - Server B All requests on port 80 are forwarded to ...
3
votes
1answer
184 views

Possible to match special characters with mod_alias and `Redirect` directive?

I’m using Apache 2.4.6 with mod_alias and have a website which is receiving traffic from a link on another website that I have no control over. The other site’s link is poorly formed and it causes ...
1
vote
0answers
132 views

Set default file and folder permission for new files and folders - apache , ubuntu

I checked the file and folder permission of /var/www/html/ using stat -c '%A %a %n' * Folders : 775 Files: 664 drwxrwxr-x 775 includes -rw-rw-r-- 664 index.php -rw-rw-r-- 664 maintenance.html ...
2
votes
0answers
193 views

Specify the order and priority of LocationMatch directives from different Apache conf files

I have custom modules loaded in Apache HTTP Server that handles different URL's i.e each module handles a specific URL depending upon the LocationMatch directive defined in each of these modules. The ...
2
votes
1answer
784 views

SSL Labs Cipher Strength < 100%, why? How do I make it?

I am in a progress of trying (again) to get maximum (or almost maximum) score on SSL Labs with my site. I currently do not understand, why it does not give me full Cipher strength score. Now, it ...
2
votes
3answers
48 views

Does redirecting http to https using RewriteEngine preserve my site's link equity?

Running an Apache web server, if I use an .htaccess file to redirect all my http:// traffic to https:// using something like RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{...
1
vote
2answers
2k views

Forcing https causes all folders to redirect

I have quite a large site that consists of some regular web pages in the root and a lot of Joomla sites in folders. So it looks a little like this: - index.php (root) - about.php (root) - product....
7
votes
2answers
528 views

Explicit differences between <Directory> and <DirectoryMatch> (and other <*Match> directives)

Preface I'm very much a neophyte regarding webservers. I'm setting up an Apache2 server and currently poring over the documentation. I noticed that the <Directory>, <Location>, and <...
0
votes
2answers
134 views

Google site verification of www https site redirected from domain

I have an Apache Tomcat 8 web app correctly running on my website that is reverse proxied to the Apache2 server which serves up the web app at my domain name. I then provided alias' in my site's conf ...
3
votes
2answers
324 views

How can the index.html file be served from a sub directory of the DocumentRoot without using system level links?

How can the index.html file be served from a sub directory of the DocumentRoot without using system level links? For example: Let the document root of an apache 2.4 virtual host be dirA Let the the ...
0
votes
2answers
1k views

Why doesn't Apache allow access to files outside the web root --from within index.html?

As the title states.. I have the following organization to my project but am unable to access the related CSS and JavaScript files from within my HTML code --unless I create symbolic links from the ...
4
votes
3answers
323 views

Rewrite to SEO friendly URLs for language negotiation with type-map files on plain html files using .htaccess

When visiting the website www.example.com/ the visitor should be redirected to the correct language version, e.g. www.example.com/en for english and www.example.com/es for spanish. My current ...
1
vote
1answer
74 views

Why does switching php versions from 56 to 71 in httpd.conf give me a 403 access denied error? (MacOS localhost)

Recently installed php71 on my local test environment. I have an index.php file with phpinfo() in the web root directory. When I LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5....
1
vote
1answer
165 views

Apache 2.4: Symlinks to CIFS mount are served, but not seen by PHP or mod_autoindex

I'm trying to run the Piwigo image gallery/DAM on a Raspberry Pi via Arch Linux ARM with Apache 2.4 and PHP7. Piwigo is running happily. For a chain of reasons outside the scope of this question, my ...
0
votes
1answer
441 views

Apache FollowSymlinks works in DocumentRoot but 403s in subdirectories

I'm trying to run the Piwigo gallery/digital asset manager on a Raspberry Pi using Apache 2.4 on Arch Linux ARM. Piwigo's running happily. For Windows file naming and CIFS reasons, I need to make ...
2
votes
1answer
2k views

How do I configure gzip to work on External Resources

In order to do this I put code to .htaccess: <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-...
1
vote
1answer
31 views

What could cause my site to redirect to its IP address using Apache2?

I've been playing around with various web configurations in Debian for about a year now. I've set up DNS for a fow domains in the process and have never really had an issue. I: Go to Google domains ...
2
votes
1answer
541 views

How can I redirect example.com/username to Instagram app directly open from deep link?

I'm trying to redirect from example.com/username​ to Instagram deep link instagram://user?username=anyusername Here is my htaccess code RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www\...
2
votes
1answer
39 views

Asked to authenticated WebDav twice when connecting to HTTPS

I'm having the problem of double authentification on my Apache server like he has: Properly Force SSL with .htaccess But I want to do this via the conf files. He says he knows how to do it via conf ...
3
votes
1answer
710 views

HOWTO log only slow requests in apache httpd

Is there a way to specify a condition in apache httpd access_log to persist only requests which took longer than 500ms to process?
2
votes
1answer
5k views

Disable TLS1.0 and TLS 1.1 through cPanel

I am using Apache and i have access of cPanel. I want to disable TLS1.0. I have no idea how to do this. Can this done via cPanel? Is there is any option how to do that? Where do I need to change ...