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.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

apache 2.4 image file problem [on hold]

I am running Apache2.4 on windows 10 I have apache installed under c:\Apache24 Everything has been working fine for quite some time. Today I tried to display an image and no matter what I tried the ...
0
votes
1answer
16 views

Debian Server Upload-Limit via PHP and SFTP

do you know where upload limits can be set on a debian server running apache2 and php7 outside of php? Problem: Can't upload files bigger than ~2MB Tried solutions: configuring php.ini (both ...
1
vote
1answer
43 views

How to redirect all requests to HTTPS with SEO friendly URL using Apache?

First of all, I would like to leave remove www and redirect all request to HTTPS like this: RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$...
0
votes
1answer
34 views

Rewrite rule messes up direct links to directories

I have a very simple rewrite rule which does the job: allows link domain.com/index.php?page=NAME to be displayed as domain.com/NAME. The problem is when I try to give direct link to the image www....
1
vote
2answers
75 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
36 views

Apache not logging referrer in all cases

I have a Wordpress site hosted on Vultr, using Plesk Onyx with Apache + Nginx. I've done this same setup for other sites and never had issues, but for this new site I am seeing some odd behavior when ...
0
votes
0answers
29 views

Subdomain for a different server

I have two servers running on different machines(say A and B), there is a middleware which i cannot access, which routes the traffic for website say xyz.com to machine A ip, now I want to route the ...
1
vote
1answer
64 views

Could someone explain what these .htaccess rules and “.well-known” conditions are for?

I am confused about both the purpose of .well-known exceptions and so many conditions. Is this just something temporarily put in place by the host or is it best practice to keep it in place? Why are ...
1
vote
2answers
42 views

htaccess url rewriting 2 get values

I am using PHP 7.2 URL Rewrite Rules. i am making 2 links first link is "category.php?inventory_id=" and second links "show-subcategories.php?cat_id" but the result is always the first link is working ...
0
votes
0answers
12 views

Nginx / Apache Gateway Timeout

I am running a VPS Server under Apache with Nginx as reverse proxy, the main reason for the server is to host my Magento store. One module in Magento runs a command that imports data content, this ...
1
vote
1answer
34 views

.htaccess rule to redirect entire site except for a couple pages is not working

I've been pulling my hair out for a couple of days over an .htaccess issue. I have a list of redirects which are all being done in this format: Redirect 301 /my-page/ https://www.example.com/my-page/ ...
1
vote
1answer
39 views

Website not working when adding .htaccess

I have my website hosted on a CentOS server. When I add the .htaccess file it stops working showing "Internal Server Error". On a side note: when I remove the .htaccess file the website works only ...
2
votes
1answer
35 views

Redirecting using rewrite rules from international top level domains to a language subdirectory doesn't change the domain name

I want to change from TLDs to TLD and language code. Right now we have 4 TLDs for our webpage: example.de example.com example.nl example.fr Now I want to change our settings of our CMS (Contao) to ...
1
vote
1answer
40 views

Apache ErrorDocument returns 404 in place of 302

I have a Directory and DirectoryMatch declaration with ErrorDocument as <Directory "/Images/folder"> Options FollowSymLinks AllowOverride None Order allow,deny ...
3
votes
1answer
55 views

403 ErrorDocument not working after changing to apache 2.4

I looked through a number of similar posts, but couldn't find the answer there: I am moving a website from a server running apache 2.2 to another server running apache 2.4 (CentOS 6 to CentOS 7). ...
1
vote
0answers
47 views

Password protect a website only if it is the dev site [closed]

I am trying to password protect a website only if it is the dev site using .htaccess and .htpasswd I am using Apache 2.4.29 on Ubuntu 18.04 Here is what I have in the .htaccess file <If "%{...
2
votes
1answer
46 views

Removing PHP Extension in sub directory

I use the following rewrite rule to remove the .php extension from my page urls: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] This works great in the root directory of my ...
2
votes
1answer
40 views

Apache rewrite to www. unless it is a dev domain

Here is my current rewrite code in my htaccess file: RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^ https://www.%1%{...
1
vote
1answer
53 views

How to rewrite specific pages using mod rewrite?

Assuming that my website homepage is https://example.com/test-website/. What I want to do is to add a query string at the end of the homepage URL and on all pages that start with https://example.com/...
1
vote
0answers
62 views

Apache alias directory only working for index page, sub pages give 404 unless directory name is omitted [SOLVED] [closed]

So I've got this weird problem, I am trying to host a php codeigniter project but I can only access my index page all the other pages give me a 404 error I want it on port 81 so in ports.conf I have ...
1
vote
1answer
80 views

Adding a subdirectory to a URL using .htaccess

I am trying to achieve the following: This URL: www.example.com/wis/9-3/1998/0.general Redirected to this URL: www.example.com/9440/wis/9-3/1998/0.general So I'm trying to add this subdirectory to ...
1
vote
1answer
35 views

Why is there no apache2handler section?

I try to figure out if the module mod_expires is installed. So I created a phpinfo() site and loaded it, but there is no section called apache2handler anywhere. In this post there is apache2handler. ...
3
votes
1answer
34 views

500 error after migrating from Easy Apache 3 to EA4 on Centos6 VPS

I made the mistake of clicking the button in WHM to migrate from Easy Apache 3 to EA4 and now I am receiving a 500 error when I try to visit my site. What have I broken and how can I troubleshoot the ...
0
votes
1answer
40 views

Wordpress or Apache or Nginx matching partial URL to full URI

I have a weird issue where either Nginx or Apache (I can't tell which - but I'm 90% sure it's Apache - Nginx is reverse proxying) is matching a partial URL to a full, random URL. For example: https://...
0
votes
0answers
47 views

Redirect IP address to domain using .htaccess [duplicate]

I tried the following .htaccess code to redirect the IP address of my VPS server to my domain, but despite of all efforts it keeps resulting in a 404 error: RewriteEngine on RewriteCond %{HTTP_HOST} ^...
1
vote
1answer
23 views

Change server structure to be able to view files/folders in browser (Dedictaed server)

I'm trying to deploy Wordpress on a red hat Linux server (dedicated server). I'm trying to access it using the normal URL structure [IP]/[rootfoldername]/[nameofthefile] but it's not working. Note ...
0
votes
1answer
147 views

For security most PHP files are out of the document root, but some are now not accessible

I am developing a internal website and it has no domain (DNS not configured for domain name) so it is just accessed via internal IP address. I have read that it is a good idea to keep backend files ...
1
vote
0answers
104 views

Oracle HTTP server URL with no trailing slash causes redirect when HTTPS is used

My application is hosted in oracle weblogic 12c with OHS 12c and have SSL enabled at port 1234. URL as such HTTP : http://servername.example/webName HTTPS : https://servername.example:1234/webName ...
1
vote
0answers
49 views

Wordpress + Cloudflare SSL redirects to apache root?

We recently deployed our new website and when trying to use it over SSL with cloudflare, it redirects to the Apache root dir? I generated origin TLS certificates and downloaded those from cloudflare ...
1
vote
1answer
70 views

.htaccess rewrite conditions for https:// pre tag subdomains

I need some extra code in my .htaccess file that configures this HTTP request for HTTPS too! <ifmodule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)\.example\.com RewriteRule ^...
0
votes
1answer
25 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
32 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 ...
1
vote
2answers
154 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
81 views

How to Remove “index of” [duplicate]

I would like to remove or restrict access to some phpbb directories
0
votes
1answer
33 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
78 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
36 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
28 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
239 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
44 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
69 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
63 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
289 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
146 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
60 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
78 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
2k 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
48 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
54 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&#...