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.

Filter by
Sorted by
Tagged with
2
votes
2answers
43 views

Apache: sd.example.com and sd.example.com/sd both work - how to disable?

I've got a vhost set up for sd.example.com. DocumentRoot is htdocs/sd. Browsing to sd.example.com works as expected. But if I browse to sd.example.com/sd, I get the same result. Is this expected ...
0
votes
0answers
23 views

Website is really slow… RAM and CPU seem OK [closed]

If I'm at the wrong place to ask this kind of question, please point me to the right direction, i'd appreciate very much! My setup I'm hosting a Drupal website on a VPS. Here are the specs: The VPS ...
1
vote
1answer
67 views

Apache2 sending virtual host with matching servername to a different virtual host

I have 2 separate domains that I want to host 2 different servers on. I have both conf files set up, but the problem is; going to my second domain in my browser sends me to the first virtual host and ...
0
votes
2answers
194 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 ...
1
vote
1answer
878 views

CGI with Reverse Proxy Settings (Apache)

I have two VMs running two webapps. We want to use example.com/foo for accessing VM1, and example.com/bar for accessing VM2. For both VMs I need to call a cgi script for downloading. So I have ...
1
vote
2answers
22 views

How to get document root set to user's public_html under LAMP cPanel?

I just opened a new VPS hosting account, with a hosting company I haven't used before, and I can't get the server to pick up the public_html directory in my user account's home directory. The server ...
1
vote
2answers
60 views

Apache redirect HTTP to HTTPS without preventing HTTP

Background I've added an SSL cert using Lets Encrypt/Certbot on my Debian 9 (Stretch) host. To modify my Apache configuration, essentially certbot copies the vhost.conf file, wraps it with and ...
0
votes
0answers
7 views

Apache: using mod_ext_filter to output html from custom program

I'm a little stumped. I have a DOS executable that I want to eventually run in my linux apache server. Research has led me to believe using the mod_ext_filter module is my best bet. I decided to ...
0
votes
0answers
4 views

Why Does Apache's ServerLimit Assign Extra Shared Memory, and How Much Does it Assign?

It's clear from looking at documentation that Apache's ServerLimit will cause extra shared memory to be assigned. If ServerLimit is set to a value much higher than necessary, extra, unused shared ...
0
votes
0answers
20 views

how to host flask website in virtualmin by using mod_wsgi?

I am trying to host flask webapp in virtualmin but for some reason it is not working.... I referred below links before hosting the site... but due to different folder structure in virtualmin got ...
1
vote
2answers
80 views

Issues with redirect rules to redirect all URLs except one page

I need to add following Apache redirect rules to .htaccess: http://www.example.com to be redirected to http://www.onemoreexample.com but http://www.example.com/support should not be redirected. To ...
1
vote
1answer
57 views

Multiple pages under single directory redirection to a single Page

I have the following scenarios for web page redirects 1) All pages under www.oldexamplesite.com/page/product/New-Design/* and All pages under www.oldexamplesite.com/page/product/nature-of-design-...
1
vote
0answers
19 views

How to turn off Apache proxy HTML correction

I'm using Apache proxy to access a web application on a VM. The proxy configuration works great, no issues. However, a side effect I see is that the Apache proxy "fixes" HTML that is being proxied. ...
0
votes
0answers
56 views

Environment variable in whm managed apache virtual host

I have an EC2 with CentOS, cpanel and whm installed. I have multiple accounts, linked with different subdomains. I have same php application deployed in the virtual hosts. I need to use environment ...
3
votes
3answers
29k views

Configure apache to make local website available for external people

I would like to make my local website (running on a virtual CentOs machine) accessible for my mate who is also working on the website. I have created a new line in my router config to forward all ...
0
votes
0answers
14 views

cgi problem command line ok but 403 on website

I am running on Debian 9 strech, hello.cgi on command line perl -cTw hello.cgi all is fine When i try to navigate to the subdirectory I get an error 403. I add some lines to apache2.conf to ...
1
vote
1answer
1k views

Using Apache's rewrite module to set up local host names for development

I have several websites on my development machine under Apache's htdocs folder. Apache Directory root is htdocs, but I want to be able to access each different site there by individual domain names. ...
0
votes
1answer
31 views

How to remove subdirectory and index.php from URL with htaccess?

I've got an apache website stored on the server at /var/www/website/ and it's the only one on that server. I'd like to adjust the URL accordingly. How can I make an .htaccess rule that would do this? ...
17
votes
2answers
11k views

StartSSL certificate gives SEC_ERROR_REVOKED_CERTIFICATE in Firefox and ERR_CERT_AUTHORITY_INVALID in Chrome

My existing HTTPS certificate is expiring soon so I bought a new one. I'm having a very hard time installing it properly though. I have a wildcard certificate from StartSSL for *.deadsea....
4
votes
1answer
1k views

Optimal way to implement very big redirect list in Apache2

I have about 6000 URLs that need to be redirected after changing the CMS. All those URLs are stored in a DB table together with an ID that allows me to tell what is being referenced. Using this table ...
1
vote
1answer
157 views

Some users are redirected to cpanel cgi-sys/defaultwebpage.cgi while other don't

I have a website which used to be hosted on a managed Bluehost plan that includes a cPanel by default. for some non-technical reasons, I've decided to move the website from Bluehost to an unmanaged ...
0
votes
1answer
29 views

Trying to understand the difference between two Apache SSL config statements

I'm using Apache 2.2.34, OpenSSL 1.0.2l. Yep, I know its sun-setted and not supported, but plans to upgrade it are not immediate. I'm trying to understand the difference between these two statements....
2
votes
1answer
3k 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
2answers
52 views

Block any other domains from using my server

Someone has set their domain to use my server. It's not a mirror, the database and everything works and updates with mine. He's basically stealing my content, and he's showing up on google instead of ...
0
votes
1answer
33 views

SSL on staging server

I have three servers: development, staging and production. I use dev as a messy environment on which I write my code. Production is my clean, sparkly, shiny tidy web server. When pushing a new version ...
2
votes
1answer
2k 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
1answer
79 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
0answers
35 views

Non subdomain is “not private” but subdomain is

I am trying to setup a website for my app domain using an Ubuntu/Apache server hosted on Linode and Cloudflare. The setup works for www.my.app but not for just my.app without the www. My ...
2
votes
1answer
20 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
42 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
42 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....
3
votes
3answers
2k views

Apache2 Ubuntu 16.04 Impossible To Get CORS Working

When visiting my website I get an error in console tab (using Firefox). The error is: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at somewebsite. (...
-1
votes
1answer
30 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
209 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....
5
votes
1answer
3k views

What are the most commonly used and basic Apache htaccess redirects?

This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to ...
1
vote
1answer
35 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:/...
0
votes
1answer
52 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 ...
1
vote
1answer
73 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
0answers
29 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
24 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
1answer
243 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 ...
2
votes
1answer
5k views

SetEnv directive not working for localhost VirtualHost but works for other VirtualHost

I have two virtual hosts declared: localhost and test. Both use the SetEnv directive and point to the same DocumentRoot: NameVirtualHost *:80 <VirtualHost _default_:80> DocumentRoot "/...
1
vote
0answers
222 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"> ...
2
votes
3answers
917 views

I can't personalise my error pages — Apache ErrorDocument directive results in additional not found error

I use apache 2.4.10, and I can't use personal error pages. I changed /etc/apache2/conf-available/localized-error-pages.conf and added : ErrorDocument 404 /404.html and created the file /var/www/404....
2
votes
2answers
63 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
39 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
383 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) ...
2
votes
1answer
49 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
1k 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\...
3
votes
1answer
3k views

Redirect https://example.com naked to https://www.example.com

I am redirecting all http:// request to https:// using apache2 virtual host file: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com Redirect / https://www....