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

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
18 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
42 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
48 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
31 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
21 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 ...
1
vote
1answer
146 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
89 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
94 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
135 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
50 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
46 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
118 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
21 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
146 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
42 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
813 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
110 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
21 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
158 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 ...
1
vote
1answer
349 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
45 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
1k 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
320 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
89 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
110 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
810 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
268 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
38 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....
0
votes
0answers
78 views

configuration error: couldn't check user: /

I am getting the following error when trying to access documents on a new instance of Apache2: configuration error: couldn't check user: / The main oddity of my setup is that I have two virtual ...
1
vote
1answer
105 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
367 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 ...
1
vote
1answer
772 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
429 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
38 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
523 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
4k 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 ...
1
vote
2answers
50 views

Make local requests from webapp to header and footer files work without redirects for the default website

We have a server that is configured to serve several sites. One of these sites is a WordPress site, and some of its pages are really Java web applications hosted by Tomcat. The Java web applications ...
2
votes
1answer
356 views

.htaccess ErrorDocument directive does not catch 404 errors triggered by PHP http_response_code(404)

Apache 2.4.10 on Windows. I have a stable Zend Framework 1 PHP application. I just decided to add an ErrorDocument directive to .htaccess. I'm completely baffled by the three different behaviors I get ...
1
vote
1answer
56 views

With several sites on the same server and different rules for HTTP/HTTPS a non-secure site is getting redirected to a different secure one

I have an Apache server that will be serving up a few sites (all from the same IP address). Site A must be accessible via HTTP and HTTPS. Site B must only be accessible via HTTP - it cannot be ...
2
votes
0answers
159 views

Running Nodejs application and wordpress in same server

I am using one EC2 instance of AWS, I have two domains which I will connect with ec2 elastic ip but one domain will have wordpress running on it and other will have nodejs application running on it. ...
2
votes
0answers
2k views

What does “Require all granted” on Directory / (root) REALY means? (Apache 2.4 on CentOS7

im sure, this question looks really stupid first. but i need a "second opinion" on this, even i did some research on my own but i am still unsure about this. By default the Apache Configuration on ...
1
vote
1answer
14 views

With page load speed being a ranking factor, what speed optimizations do you recommend to prioritize? [closed]

My website has been becoming slow somewhere during development, according to visitors who emailed me, what speed optimizations do you recommend to priotize? Caching? CDN? Any input is very appriciated!...
3
votes
1answer
59 views

Phantom vhost forwarding from example.com to example.net

I'm running apache2 on Ubuntu 16.04 LTS, and Let's Encrypt Certbot for SSL certificates. I have two domains. Regardless of http or https, www or non-www, I want them to land at https://example.com ...
1
vote
1answer
47 views

Apache based Web sites show a dir listing instead of site content

All websites points to a directory listing ("Index of") of /var/www/html and when I click on any sites of the list, I see a duplicated domain and tld. A Syntax error is given, regarding: line 219 ...
1
vote
1answer
63 views

SSL Protect Unlimited Sites Under a Single vHost Without Server Restarts

I am creating a platform similar in concept to Wix for hosting websites. I wish to ensure that all the sites (except where specific issues prevent this on a site by site basis) will be protected by ...
4
votes
0answers
189 views

Ubuntu 14.04 can't enable .htaccess

I'm developing a website local and just switched from Windows to Ubuntu 16.04 - Sadly my .htaccess doesn't seems to work since rewrite rules don't apply and sources can't be found. I activated: sudo ...
2
votes
0answers
60 views

multiple virtual host in apache 2.22 on debian 7 … very strange and inexplicable behavior … someone can try to help me? [closed]

I'm facing a configuration issue that's really diving me nuts ... Basically I'm working as a sysadmin for a customer who use a single server to host many different site, to be more specific: Server ...
7
votes
1answer
526 views

Browser cache persistently expires for images in mod_pagespeed cache

Recently installed Google's plugin mod_pagespeed and I want to use it exclusively to address image optimization. So far the result frim Pagespeed insights has been hit or miss. Half the time it does ...
1
vote
1answer
538 views

How to issue .htaccess for Laravel?

I have just launched a Laravel 5.3 project on a live server and all is going well except one. But my issue is, my websites are running on all 3 different URLs: example.com example.com/public/index....