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
0answers
16 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
43 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
47 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
30 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
36 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) ...
1
vote
1answer
22 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
44 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
299 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
38 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
23 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
264 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
159 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
176 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
311 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
54 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
53 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
170 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
25 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
232 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
69 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
1k 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
141 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
46 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
176 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
616 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
47 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
424 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
116 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
190 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
298 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
52 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
87 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
126 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
414 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
1k 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
474 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
628 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 ...
1
vote
2answers
51 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
380 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 ...
3
votes
0answers
192 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
15 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
60 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 ...