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
3
votes
1answer
32 views

WP Apache .htaccess redirect .com traffic to .co.uk Issue

I have a website I am looking to redirect .com traffic to .co.uk. For the moment, when I navigate to https://example.com, it redirects to https://www.example.co.uk and displays as such in the address ...
2
votes
2answers
44 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 ...
1
vote
2answers
23 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 ...
0
votes
0answers
10 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 ...
1
vote
2answers
62 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
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
22 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
0answers
20 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
68 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 ...
1
vote
1answer
61 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
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 ...
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 ...
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? ...
1
vote
1answer
184 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
35 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 ...
1
vote
2answers
53 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
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....
1
vote
1answer
68 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 ...
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
43 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
31 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
234 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....
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
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:/...
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
0answers
243 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
81 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
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
434 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
53 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
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\...
1
vote
1answer
85 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
68 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
1k 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
1answer
616 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
873 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
297 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
129 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
503 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
42 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
431 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
250 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
5k 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
333 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
223 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 ...