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

The Apache HTTP Server is an Open Source Web server, which originated from a series of patches to the NCSA HTTPd. Apache is the world's most popular Web server, which is run on 54.90% of all Web servers according to the Netcraft survey conducted July 2010.

0
votes
0answers
16 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\...
0
votes
0answers
11 views

Application Load Balancer causes infinite redirect without a trailing slash (/)

I have a rails site using an AWS ALB and all routes appear to work except one, robots.txt. I am getting the error "ERR_TOO_MANY_REDIRECTS" After some research I found many places that said the Load ...
0
votes
1answer
20 views

.htaccess rewrite rules working on Mac Apache 2.2 but not on CentOS Apache 2.4

I've run into an issue when moving from a test server to a production server. I have a set of .htaccess rules in a file in the public_html site root: #Root directory htaccess RewriteEngine On # ...
-1
votes
0answers
19 views

Apache website being served from two subdomains [migrated]

I have a virtual Ubuntu 18.04 server that hosts a couple of websites I've installed through bash. I have Apache well configured so that mydomain.com gets forwarded to www.mydomain.com and all my ...
0
votes
0answers
27 views

How to continue or restart a failed Certbot transaction

We run a web server for a free/open source project on a CentOS 7 VM. We have Apache 2.4 installed from Red Hat's Software Collections (SCL). We also installed EFF's Certbot from EPEL to manage HTTPS ...
3
votes
1answer
51 views

421 Misdirected Request on Shared Host

I am on a shared host (Apache) and am receiving little help resolving this issue. I have a main domain https://www.waldorfteacherresources.com and I have set up two cookieless domains: static....
1
vote
1answer
77 views

Subdomains getting redirected to root directory of virtualhost

I'm trying to have 3 different domains and subdomains on my VPS: pd.example.com intranet.example.com example.com I have configured them, but for some reason each subdomain is getting redirected to ...
1
vote
1answer
34 views

403 Forbidden error was encountered while trying to use an ErrorDocument

I am trying to configure Apache HTTP Server by running a web application using Apache's mod_fgcid, a module for FastCGI. I have put a configuration file which allows the interface of my app to be ...
2
votes
1answer
10 views

How to define RewriteRule to skip parameter in uri

I heve the following rule: RewriteRule ^/shop$ https://www.example.com/category the rule is working as expected with one exception: if in url there are parameter following the shop path, for example:...
0
votes
0answers
18 views

How to configure apache2 mod_wsgi to deploy Flask application?

I currently have a server with Debian 9, which has a LAMP package installed. I have been asked to deploy an application using Flask, he managed to deploy it but from the console using python app.py, ...
0
votes
0answers
19 views

A ghost is propagating an Apache redirect

I have a httpd.conf file with some redirects like this: <Directory "${SRVROOT}/htdocs"> Options Indexes FollowSymLinks ExecCGI AllowOverride None Require all granted Redirect ...
2
votes
0answers
11 views

Change default index.html page of a subdomain in directadmin

When I create a new subdomain in direct admin panel it gets a default placeholder page saying something between the lines "welcome, the page is under construction" or whatever. I've looked online ...
1
vote
1answer
47 views

Apache rewrite existing rewritten url [closed]

I know how to create rewrite rules in Apache but what I don't know is how to rewrite a previously rewritten url. This is an old URL /boats-for-sale/fairline-squadron-55/1280 and I need to redirect ...
1
vote
0answers
33 views

Cannot figure out how my nodejs application run with apache

I need to push my node app updates to remote host which is really wired. It uses standard cPanel + apache bundle, but also has node installed. Root domain mywired.host hosts static files from ...
0
votes
0answers
23 views

Accessing pdf using iframe on different IP

I have WAMP installed in a machine in IP address I just call as IP1. I can access the PDF files in this IP1 inside the www folders using iframe with no problem. But there are other PDF files inside ...
2
votes
2answers
84 views

How is it best to redirect http to https in cPanel?

I am setting up a new site on a domain that has an SSL certificate. The DNS is all configured correctly and I can access the site on either http://example.com or https://example.com URLs. Currently, ...
1
vote
0answers
31 views

Apache2: create a unique identifier that is actually base64 encoded

Apache has a module called mod_unique_id that generates a unique environment variable (UNIQUE_ID) that is unique across all requests. However, its encoding is over the range [A-Za-z0-9@-] instead of ...
0
votes
0answers
13 views

How to find shared hosting with two capabilities [duplicate]

1) Apache server 2.4.33 or later. 2) Able to give a programmer access to just one domain, even tho I host more than one with the hosting service. 3) Shared hosting, not VPS. How do I find such a host?...
0
votes
0answers
24 views

How do I create a custom Apache log (with just htaccess files) that logs filenames (and paths)?

I have 1and1 shared hosting (for better or worse) and Apache configuration is done via htaccess files - no access to configuration files is provided. I want to create a custom log to log accesses to ...
5
votes
3answers
64 views

What directory structure is typically used for domains and subdomains on a Linux Apache server

Although I've used MAMP and AMPPS before on OSX, simply for testing purposes, this question is about actual production websites on Apache servers. If I had the domain name www.example.com - if this ...
0
votes
1answer
54 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 ...
1
vote
1answer
24 views

How do I log in into Apache web server on Ubuntu from Windows?

I've been given a username and password for an Apache server, that runs on Ubuntu, and belongs to my professor. I do not know how to connect to the server from my machine(windows), and run scripts ...
4
votes
2answers
84 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/...
1
vote
0answers
27 views

How do I serve webp images from my WordPress site but exclude the WP backend/admin

For some reason that I cannot fathom, my Chrome installation does not show me webp images from my website. I can see webp images on other sites (I think - how can you tell if you are being served a ...
2
votes
1answer
31 views

Redirecting from one page to another page on my website causes 404 error after using .htaccess file

Currently I'm working on a PHP blog. Where I have used an .htaccess file to get a clean URL, here is the code: RewriteEngine On RewriteCond %{HTTPS} !=off RewriteCond %{HTTP_HOST} ^example\.com$ ...
0
votes
1answer
55 views

Why would a user agent string contain both “Samsung” and “AppleWebKit”?

Investigating an issue on a website, I see an entry in the Apache log with this User Agent setting: Mozilla/5.0 (Linux; Android 8.0.0; SAMSUNG SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like ...
1
vote
0answers
29 views

What command will restart Apache from a PuTTY terminal to manage a cPanel server?

Once when we logged on to the server via putty terminal with authorised SSH credentials What is the command given to the putty terminal for restarting the Apache server after loading some extensions? ...
1
vote
1answer
163 views

Why gzip compression not working on font file?

Resources on my site are compressed before sending to client browser, except fonts, I've checked everything but couldn't find anything wrong. Here is my CSS, one of the fonts: @font-face { font-...
1
vote
1answer
51 views

HSTS implementation when using www.TLD

Been looking at implementing HSTS in to one of our sites, hoping to validate it on the preload list. But I can't get my head around how it works with the www. Subdomain. Our site forces secure www....
1
vote
0answers
24 views

Mod_Security false positive, how can I whitelist?

I am getting the following error while I am trying to create a web service. How can I white list this user agent? I am not really able to understand the following error message. [error] [client ...
2
votes
1answer
68 views

Googlebot URLencoding longtail URLs which is causing server errors

My Google search traffic has been growing consistently for months without any hiccups. Then a few days ago, Google dropped my traffic by about 80% in one day. The traffic would then later rebound ...
1
vote
0answers
103 views

.htaccess How to redirect some specific pages, then a blanket rule to new domain?

I am creating a new website on a new domain, and doing page-to-page redirects from the old website for (A) all static pages, as well as (B) all blog posts. A) The static pages follow a new URL ...
1
vote
2answers
104 views

IP address redirect works, Domain redirect does not

Similiar to issue found here. Running debian, apache2, trying to redirect example.org.com to example.org.com/aplication/calculator. I have enabled mod_rewrite hence why IP redirect works. However if ...
0
votes
0answers
32 views

localhost/phpmyadmin - 404 error MacOSx Sierra

I'm setting up a php project on my machine's loalhost. This part is working fine, and it's loading the 'index.php' correctly when visiting 'http://localhost'. However, visiting 'http://localhost/...
1
vote
1answer
55 views

Can't include file with php due wrong permissions on local server

I have two computer I wish to work to create websites, one is an imac with osx 10.13.14 and the other is a ubuntu 16.04 that I use as server with Apache. I need to be able to edit files in both ...
3
votes
1answer
84 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 ...
0
votes
2answers
71 views

General questions on operation of SSL secured sites [closed]

I am trying to get some understanding on differences between unsecured (http:// accessed) and SSL secured (https://) websites on Apache servers. So I am not trying to solve a specific problem right ...
2
votes
0answers
124 views

503 service unavailable error for ALL files except PHP files when using Apache virtual hosts

Apache 2.4/ PHP 7.0 Virtual hosts setup working correctly. There are no issues loading JPG files when pointing directly to the server using IP address. <VirtualHost *:80> ServerName example....
1
vote
0answers
57 views

Get CPU load statistic from apache access log [closed]

I have apache access log, i want to parse it and to get top CPU load pages and agents. Does somebody know good script for this? My log line has this format: host.ru 11.11.111.11 - - [01/Apr/2018:11:...
4
votes
1answer
250 views

How to add force https to htaccess file RewriteRule with _route_=$1

I inherited support for an Opencart 1.5 site which needs to have SSL enabled. I've edited the config.php files in / and admin/ and adding https:// to the URL is working in the browser and links are ...
1
vote
1answer
258 views

Forcing trailing slash at end of “fake” folders

The working codes that I've found here most put a slash in everything. I just need force trailing slash in these "fake dirs" (that are part of my rewriting scheme (only directories)) and keep ...
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://%{...
2
votes
1answer
127 views

Deny access to one of two sites using the same .htaccess

I need to set up my .htaccess file to deny access to the site if they are accessing the staging.example.com. I have a Magento 2 store and have set up deployment using Capistrano, which will be ...
1
vote
2answers
699 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
255 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 <...
2
votes
1answer
144 views

Apache based site denied to everyone except but some IPs, with customised 403

We need to have an IP protected Apache. So only a couple of IPs allowed for the whole server. Rest needs to be blocked. However, since all other IPs are blocked, even the custom error documents are ...
0
votes
2answers
44 views

How to redirect website with SSL (HTTPS) to without SSL (HTTP)?

I have a WordPress site on a domain that used to be HTTPS, example domain https://example.com. I now want to remove HTTPS temporarily. How do I do that? I have tried to add the following to my ....
3
votes
1answer
491 views

How can I make a specific series of URLS have “410” Gone status?

Server was hacked and my .htaccess file was changed to wildcard redirect (spam). I am seeing a lot of requests like those below even after I've cleaned up my server: example.com/cobwebbing-...
1
vote
1answer
31 views

How do I get and install an SSL certificate on a Bitnami image on Amazon EC2?

I need to get an SSL certificate installed on an Amazon AWS EC2 instance that runs the bitnami image. I watched this YouTube video on how to do it but during the video he creates the CSR and then ...
0
votes
0answers
95 views

Server has been hacked. CXS Cleaned it up but hackers keep uploading scripts

On Centos X64 / Apache / WHM / Cpanel When I look in my apache_logs I see THOUSANDS of these types of LOGS. various days, always a different IP over and over and over. What are they trying to do? ...