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

Configuration file used by HTTP Server called Apache.

1
vote
1answer
24 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
1answer
206 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
1answer
47 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 ...
1
vote
1answer
42 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....
0
votes
1answer
386 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 ...
0
votes
0answers
79 views

How to redirect any uppercase url automatically to lowercase using htaccess? [duplicate]

https://www.privosa.com/Men-Wedding-Rings.html https://www.privosa.com/men-wedding-rings.html Above both URL need to work. I have shared hosting packages. And server support team says "we don't ...
1
vote
1answer
76 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 ...
3
votes
1answer
564 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?
2
votes
0answers
2k 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
0answers
420 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
0answers
47 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 ...
2
votes
1answer
121 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 ...
3
votes
1answer
185 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@...
3
votes
1answer
230 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
2answers
2k 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
1answer
42 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
1answer
120 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
0answers
45 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 ...
1
vote
1answer
129 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 ....
1
vote
1answer
74 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 ...
3
votes
2answers
2k 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 ...
0
votes
1answer
493 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
1answer
799 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 ...
1
vote
1answer
201 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 ...
2
votes
1answer
968 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 <...
2
votes
0answers
157 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 ...
0
votes
2answers
57 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
2answers
2k 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
1answer
1k 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
1answer
135 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 ...
0
votes
1answer
378 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> ...
1
vote
1answer
9k 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 ...
2
votes
1answer
26k 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:...
3
votes
1answer
79 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
2answers
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)...
2
votes
1answer
6k 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 ...
3
votes
1answer
7k 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
1answer
410 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/ ...
3
votes
2answers
4k 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
1answer
75 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 &...
18
votes
8answers
78k 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.
4
votes
1answer
1k 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
2answers
3k 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 ...
3
votes
1answer
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....
3
votes
1answer
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, ...
3
votes
1answer
314 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 ...
-2
votes
1answer
16k views

XAMPP phpMyAdmin - Access forbidden!

I can't access PHPMyAdmin. I have installed XAMPPlite 1.6.5 on Windows 7. I haven't changed any config, except .htaccess, where I added the third line: Order deny,allow Deny from all Allow from ...
5
votes
1answer
7k views

HTTP Header Cache Time: s-maxage and max-age

I am setting up a CDN for my website, I found the following sample for adding to the 'httpd.conf' file, this is used to adjust the cache-time for client and CDN: ExpiresActive On ExpiresByType image/...
2
votes
2answers
628 views

Creating a Sub Domain on Dreamhost [closed]

I am trying to create a sub domain play.mink7.com i went to Domains and Add Domain and added the Subdomain. It created the DNS records. Now when i go to the website http://play.mink7.com am getting ...
1
vote
1answer
2k views

What response headers encourage 304-Not Modified upon reloads?

When looking at the network waterfall in Firebug/Chrome/IE9, I keep seeing "200-OK" instead of "304-Not Modified" for many cache-able files (images, js, css) on this page, for example. I believe it ...