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 [apache]

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
1answer
17 views

Proper File Name Conventions for File Indexes [duplicate]

I have a subdomain set up as an online file index. However, I am interested in the best practices for filenames. For example, all of my directories are lowercase, but some of my files contain ...
3
votes
2answers
27 views

Mod Rewrite proxy to different backend hosts

I have a virtual host with multiple ServerAlias host1.example.com host02.example.com etc. I match the same pattern and based on ServerAlias I want to proxy them to different backend hosts. What I ...
0
votes
0answers
13 views

Group permissions don't allow the web server to serve files on shared setup, only permission 777 does the trick

I have installed Apache httpd Server on Amazon Linux. The default document location is /var/www/html. However, I would like to share the web server across many users on this server where each user ...
1
vote
2answers
61 views

How secure is an .htaccess file?

I am creating a new website and I want to make it as secure as possible. I was preparing to do some things with .htaccess and I'm semi-concerned about the security level it provides. Can someone (ex: ...
0
votes
1answer
16 views

How to Remove “index of” [duplicate]

I would like to remove or restrict access to some phpbb directories
0
votes
1answer
21 views

Trying to add a mail server, mail.example.com redirects to different subdomain. How do I stop that?

I have an Apache web server that also runs my Gitlab server and now I'm trying to make it a mail server too. Various tutorials told me that I needed to start with adding some DNS entries and getting ...
1
vote
1answer
65 views

HTTPS proxy in Apache without certificates

The TLS handshake initiation contains the requested domain in cleartext, to allow a server to select the correct certificate. Therefore, the server should be able to proxy the handshake, and all ...
1
vote
1answer
16 views

Creating new virtual server or Sub-server breaks all existing domains

Hellow, I have 3 domains and several subdomains in Virtualmin which works fine. For the past 1 year, I didn't do any server maintenance except for updating the packages which shown in the Webmin ...
2
votes
0answers
21 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 ^(.*)$ /...
3
votes
1answer
44 views

Non WWW redirect to WWW and non SSL to SSL - htaccess

I'm trying to redirect my Wordpress site from non www to WWW and non SSL to SSL permamently. Here's the code I'm using: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{...
1
vote
0answers
41 views

Grant access if URI contains MAC / salted hash / specific pattern [closed]

want to grant access to my apache server directory only if the URI follows a specific pattern. The URI should look like /pathname/hash/ with hash being a salted md5() hash over pathname and a fixed ...
1
vote
1answer
23 views

.htaccess - redirect the contents of a subdirectory of old domain to new domain (WordPress) [duplicate]

I have problems with the redirection of my old website to our new website under a new domain. The old website was created with Wordpress and the simple redirect 301 was successful. However, some pages ...
1
vote
1answer
53 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 ...
1
vote
1answer
265 views

RewriteEngine .htaccess rules end up redirecting to example.net/https:/example.net

I'm starting to learn about the Apache .htaccess and I have some issues in my website... RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteCond %{...
4
votes
1answer
77 views

Will forbidding “bad bot” user agents via .htaccess add a layer of protection against email address scraping beyond the existing captcha?

I was reviewing the security/protection measures for the websites I manage (one is for a small consulting firm, the other for a not-for-profit art association), and I came across the topic of bad-bot ...
1
vote
2answers
38 views

Rewriting URL of WordPress in a Subdirectory

I am renting some webspace and a domain from BlueHost.com on which I run a WordPress site. Let's call it example.com. WordPress is installed in the root folder. As I can run multiple sites on this ...
1
vote
0answers
17 views

Allow our own systems to use an API and restrict it from the general internet without using authentication

I have an Apache server which is reverse proxy'd to some Java container. In Java container there is an API that we don't want internet to see but expect our own systems to use it without any ...
0
votes
1answer
70 views

How to migrate from HTTP and HTTPS old sub domain to HTTPS root new domain in htaccess with least SEO risks?

Looking for the best site migration strategy for SEO, which consider these specific combinations of elements and challenges: *note: site is in Wordpress. Htaccess redirect code to go from sub ...
1
vote
1answer
182 views

How to remove port number from the URL?

I need a help for the remove port number from the URL. I host a site on VPS using xampp virtual host. Everything is working perfectly,but cant access domain without port number EX: www.example.com:...
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....
6
votes
2answers
43 views

In .htaccess files, is there any difference at all between “!=on” and “off”

I’m trying to better understand Apache’s use of a binary attribute. In an .htaccess file with the code # Check if HTTPS is 𝗻𝗼𝘁 𝗼𝗻 RewriteCond %{HTTPS} !=on Is there more processing occurring&#...
3
votes
2answers
137 views

How to use X-Robots-Tag to noindex all subdomains (save specific exceptions)?

Google's Robots meta tag and X-Robots-Tag HTTP header specifications page (Practical implementation of X-Robots-Tag with Apache section) gives an example of noindexing certain filetypes, ie: <...
0
votes
0answers
380 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
1answer
26 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 # ...
0
votes
0answers
71 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
189 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
78 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
375 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
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
38 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
54 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
240 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
29 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
353 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, ...
2
votes
1answer
131 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
32 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
130 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
227 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
26 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
381 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
320 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
37 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
67 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
42 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
446 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
99 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
47 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 ...