Questions tagged [httpd.conf]

Configuration file used by HTTP Server called Apache.

Filter by
Sorted by
Tagged with
1 vote
0 answers
37 views

httpd.conf is cached and no editing is succesful [closed]

I am going to use the WSL system on Windows10 to create a website. The distro is Ubuntu. I put httpd.conf in /etc/apache2/conf-available where there are these two lines (line 40): Define SRVROOT "...
  • 111
2 votes
1 answer
1k views

Why does RewriteRule for "^//(.*)" (begins with double slash) not redirect to a single slash?

Have this rewrite rule in vHost context. But it does not rewrite requests that begin with //.* (double slash). Just serves them up from /.* (single slash) instead of responding with a redirect to /.* ...
  • 143
1 vote
1 answer
511 views

AH00558: httpd: Could not reliably determine server's fully qualified servername error after creating VirtualHost

I have installed an Apache server in CentOS 8 and it was serving both http and https pages correctly, that is, I could view the Apache test page when connected to the server from my browser I used ...
  • 111
1 vote
1 answer
455 views

update virtual host's SSL cert after cpanel has expired

I had setup the server, virtual hosts via cpanel. I didnt renew my cpanel subscription because I no longer needed it. Now my SSL certificate has expired. I have SSH access to the server. How do I ...
2 votes
0 answers
35 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
1 answer
50 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
1 answer
2k views

How to open port 8080 on windows 10, configure firewall and any other settings?

I have a Windows 10 computer. I am attempting to get my WAMP web server on the web but have been and continue to be unsuccessful. I believe I narrowed it down to windows though. My Motorola Cable ...
1 vote
1 answer
1k views

Put WAMP online but hide its server index page

Currently I'm able to put WAMP online and access all my projects from other devices using the host IP address. But what displeases me is the fact that even from other devices, the server's index file ...
2 votes
1 answer
269 views

Why does switching php versions from 56 to 71 in httpd.conf give me a 403 access denied error? (MacOS localhost)

Recently installed php71 on my local test environment. I have an index.php file with phpinfo() in the web root directory. When I LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5....
  • 131
0 votes
1 answer
1k views

Apache FollowSymlinks works in DocumentRoot but 403s in subdirectories

I'm trying to run the Piwigo gallery/digital asset manager on a Raspberry Pi using Apache 2.4 on Arch Linux ARM. Piwigo's running happily. For Windows file naming and CIFS reasons, I need to make ...
1 vote
1 answer
241 views

setting rewrite rules in httpd.config file at host server

I am a new webmaster. I plan to host my website on a dedicated server. The website has three TLD: .com, .ma and .fr. I have a couple of rewrite directives in my .htaccess file that force the URL ...
  • 217
4 votes
1 answer
2k views

HOWTO log only slow requests in apache httpd

Is there a way to specify a condition in apache httpd access_log to persist only requests which took longer than 500ms to process?
  • 149
2 votes
1 answer
10k views

What does "Require all granted" on Directory / (root) REALY means? (Apache 2.4 on CentOS7

im sure, this question looks really stupid first. but i need a "second opinion" on this, even i did some research on my own but i am still unsure about this. By default the Apache Configuration on ...
1 vote
0 answers
514 views

Leverage Browser caching - not picking up expires header

Currently working on improving my page speed score with Google PageSpeed Insights. My biggest issue according to PageSpeed Insights is Leverage browser caching. About 17 images come back as "no ...
1 vote
0 answers
54 views

Trouble redirecting sub.example.com to sub.example.com/directory/

I have a website set up at example.com/directory/ currently. /directory/ is set up to display different contents depending on the subdomain, that part is working fine. I'm having trouble editing my ...
  • 111
2 votes
1 answer
376 views

Apache httpd.conf && .htaccess directives written in PCRE?

I look at the directives syntax of Apache configuration files like httpd.conf && .htaccess and I must say it looks quite similar to PCRE syntax (that stand for Perl Compatible Regular ...
user avatar
2 votes
1 answer
235 views

How can I modify httpd.conf to add one more site in Apache 2.4.6?

How can I modify httpd.conf to add one more site in Apache 2.4.6? Here is my httpd.conf: ServerRoot "/etc/httpd" Include conf.modules.d/*.conf Listen 80 User apache Group apache ServerAdmin root@...
  • 155
3 votes
1 answer
621 views

Can html go in the ErrorDocument value internally in httpd.conf?

According to apache documentation, the final parameter of ErrorDocument can be specified as a path, URL or text to any error code. What I have done so far to eliminate any calls to the I/O file ...
0 votes
2 answers
4k views

Disabling If-modified-since / if-none-match on web server for some files

What I want to do is try to get search engines to rescan my sitemap files (plain xml files stored on server). It did recently attempt to access it but it received a not modified response (HTTP status ...
3 votes
1 answer
68 views

Require valid ServerName in httpd.conf

I have two virtual hosts, and have sites1.com and sites2.com pointing to my server. All works fine. <VirtualHost *:80> ServerName site1.com DocumentRoot /var/www/site1/html <...
1 vote
1 answer
220 views

In httpd.conf why would you want AddType for phps?

We have an AddType as follows: AddType application/x-httpd-php-source .phps I was wondering what this was, and did some searching. It seems this is barely documented anywhere. Based on a hunch, I ...
1 vote
0 answers
52 views

Security and Apache Methods

I occasionally get annoying POST requests but one lately caused a 500 error. Not a biggie really, but it got me thinking. My site does not have but one form. Outside of this, POST should not exist ...
  • 32.7k
1 vote
1 answer
643 views

Lowercase 301 Redirects - Site Assets Disappear

I am trying to force all my URLs to be lowercase, but in doing so, I lose the connection to all my site assets. I've added this to my in my .conf file: RewriteMap lc int:tolower And this to my ....
  • 223
1 vote
1 answer
84 views

How can I disable the certificate/SSL handshake on the 'www' version of my site served by Apache?

We use SSL on the https://www version of our website. Now I would like to disable the SSL connection on the https://non-www version of our website, so the result is: https://non-www => SSL handshake ...
  • 653
3 votes
2 answers
4k views

Apache 2.4 <Directory> with regexp - is the alternation operator broken, or am I confused?

I have several document root directories, /opt/lampp/htdocs/proj1, /opt/lampp/proj2, etc, that have AuthType Basic password protection. I want their uploads sub-directory trees not to require a ...
  • 193
0 votes
1 answer
548 views

Set DNS subdomain manually

I am using the Zpanel v10.1.1 + CentOS 6.5 after setup all, I transfer all mysql databases, files and then domain. All working perfectly. But I am stucked at subdomain, when we create a main domain it'...
2 votes
1 answer
1k views

How to add the ‘www’ prefix to my domain

I am trying to add www to my domain. I have the custom PHPcode on live server. I have workout GoDaddy forward options also but still my domain not forward. I have a site designed in Core PHPand was ...
  • 21
1 vote
1 answer
441 views

Fastest Redirection on Apache Server with Wordpress for a Small ~200 Page Website

If I have a website of about 200 pages and most of the links will be inevitably changing, what is the faster way to redirect them (fastest not in terms of how quickly I can do it, but in terms of the ...
  • 35
2 votes
1 answer
1k views

How to block a wildcard subdomain in httpd.conf

So I am able to block specific subdomains like this: SetEnvIfNoCase Referer knownsub\.sorryspammer\.com sorryspammer <Location /> Order Allow,Deny Allow from all Deny from env=sorryspammer <...
  • 23
2 votes
0 answers
169 views

apache is not allowing me to use port number 443 in virtual tag for configuring apache for https service [closed]

I am trying to configure apache for https service in xampp , i am almost done i am jsut struggling with that virtual tag in which i have give information about my self-signed ssl-certificate and key ...
  • 21
0 votes
2 answers
64 views

Does every webserver have an httpd.conf file?

I have spent my whole day finding the location of the httpd.conf file for my website. I contacted my host and they told me they didn't give us permission to modify the httpd.conf file. Some ...
0 votes
2 answers
8k views

Location of httpd.conf file

I have setup a home server on my PC and I can edit my httpd.conf file on it. When I move to my web server I can't see the location of my httpd.conf file. Is it in the www directory of the website? ...
1 vote
1 answer
2k views

How to change cPanel URL? Example: mydomain.com/cpanel

I want to change my website's cPanel URL/path for security reasons. I have a VPS with shell root access, running centOS 6.5 64-bit. I want to change cPanel path for my website on the VPS to be ...
1 vote
1 answer
153 views

What is the purpose of <Directory /> with a local <VirtualHost>

<VirtualHost *:80> DocumentRoot /var/www <Directory /> </Directory> </VirtualHost> Does the <Directory> tag refer to /var/www on the server, or /? What ...
  • 113
0 votes
1 answer
473 views

filter admin access by IP with httpd.conf

I am trying to filter all backend url to one IP in the httpd.conf file using this code: <Location /admin> Order deny,allow Deny from all Allow from 100.x.xxx.xxx </Location> ...
  • 101
1 vote
1 answer
10k views

How to redirect IP to domain?

My IP xxx.xxx.xxx.xx is pointing to example.com at GoDaddy but I just noticed that when I type the IP in browser, it doesn't redirect to the website, how can do this? I am sure this will happen ...
  • 111
4 votes
1 answer
46k views

Set the "servername" directive globally to suppress this message

I am setting up PHP for the first time and I am getting this error from the Apache server: Set the "servername" directive globally to suppress this message. This is the content of my httpd.conf file:...
  • 324
3 votes
1 answer
87 views

Pointing a parked subdomain to a real subdomain

I have two registered domains. Say the domains are originaldomain.com and parkeddomain.com. parkeddomain.com points to originaldomain.com. I also have a few subdomains in originaldomain.com, and I ...
1 vote
2 answers
4k views

How can I block a user agent from all sites on my server? [closed]

For the last few days, I've been suffering from what appears to be a (presumably inadvertent) DDOS attack. I've been getting so many requests from an agent identifying as "Mozilla/4.0 (compatible; ICS)...
3 votes
1 answer
9k views

Apache server not able to read cookies from Browser

I have developed a login authentication page using cookies (with spring security) where for the first time, the user will need to get itself authenticated. Once the user gets successfully ...
  • 143
4 votes
1 answer
8k views

How can I force a VirtualHost in Apache to not listen for undefined subdomains on 443?

In /etc/apache2/sites-available/example.com: <VirtualHost *:443> ServerName www.example.com DocumentRoot /var/www/example.com/htdocs SSLEngine on ...
1 vote
1 answer
730 views

Apache - Reverse proxy

I am using Apache 2 and using the below virtual host definition in httpd.conf file <VirtualHost *> ServerName localhost ProxyPass / http://localhost:8080/stackoverflow/ ...
  • 143
3 votes
2 answers
5k views

Have UserDir enabled but also want to rewrite url if called differently

I am setting up a new server for our users to use have have personal webspace on. I have in my httpd.conf of apache the directives for UserDir as follows UserDir disabled root UserDir public_html ...
2 votes
1 answer
87 views

How should I set the default virtualhost?

I want to run 2 websites. One for www.example.com, and the other for everything else (www.example2.com, www.example3.com) How I do it? I tried: <virtualhost *:80> ServerName www.example.com &...
  • 119
23 votes
9 answers
112k views

How to Change the www root directory on WampServer

How can i change the root directory of the currently installed wampserver to some other directory.
5 votes
1 answer
2k views

RewriteBase has to change when using UserDir

I have setup our Apache server to use UserDir. This mean our URLs are: http://dev.server.com/~username/drupal/html/ Before our URLS were: http://dev.server.com/drupal/html/ In the 2nd case I ...
3 votes
2 answers
4k views

Apache HTTP Server Configuration on Port Other Than :80

I am running an apache server for development on windows 7 (via XAMPP). By default, it is set up to listen on port :80 for http:// requests. I can configure it for, say, port :1234, and can access ...
  • 405
3 votes
1 answer
9k views

301 Redirect from www to non-www without using VHOST

I have my web application running on EC2 with Apache. I want to redirect www to non-www. On searching Google, I used this but it leads to redirect loop: <VirtualHost *:80> ServerName www....
  • 135
3 votes
1 answer
2k views

Enabling SSL on Apache2 causes address already in use error

My server works just fine on a normal Apache2 install. Now, I'm trying to install subversion on this server using a guide I found on the net called: Installation of Subversion on Ubuntu, with Apache, ...
  • 141
3 votes
1 answer
358 views

Stop Apache serving filetypes

Preferably using .htaccess files, though .conf files are an option, is there any way to stop Apache serving certain filetypes? For example, .db shouldn't be served for obvious reason (privacy and ...
  • 133