Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
0answers
39 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
38 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
16 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
20 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 ...
1
vote
1answer
22 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
50 views

Warning Notice 'SOA Expire Value out of recommended range' Still appears despite modifying SOA Expire Value

I have a website, which is hosted on a VPS, where I entered it into MXToolbox's 'Domain Health' resource. All was fine, except for 2 DNS related issues as follows: SOA Expire Value out of ...
0
votes
0answers
18 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
20 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
89 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
42 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
36 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
57 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
22 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
30 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
81 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
21 views

How to Remove “index of” [duplicate]

I would like to remove or restrict access to some phpbb directories
0
votes
1answer
25 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
72 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
25 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
27 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
57 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
43 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
25 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
57 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
284 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
104 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
44 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
75 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
731 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
46 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
47 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
264 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
579 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
35 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 # ...
3
votes
1answer
314 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
452 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
13 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
21 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
70 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
332 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
32 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
527 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
208 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
45 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
275 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
327 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
30 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 ...