Use this tag for questions related to the Apache http server (any version, but make sure to provide Apache version numbers in the question unless not relevant). Generic webserver related questions should use the tag: webserver. Few of the other Apache related projects have their own tag, don't use ...

learn more… | top users | synonyms

28
votes
5answers
3k views

Does /usr/sbin/nologin as a login shell serve a security purpose?

In my /etc/passwd file, I can see that the www-data user used by Apache, as well as all sorts of system users, have either /usr/sbin/nologin or /bin/false as their login shell. For example, here is a ...
24
votes
7answers
18k views

How to disable SSLv3 in Apache?

Everybody seems to be talking about the POODLE vulnerability today. And everybody recommends disabling SSLv3 in Apache using the following configuration directive: SSLProtocol All -SSLv2 -SSLv3 ...
18
votes
2answers
49k views

What user should apache and PHP be running as? What permissions should /var/www files have?

I just spun up an Ubuntu 11.10 box and then ran apt-get install apache2 php5 to install apache2 and PHP 5 on the box. Now it is functioning as a "web server" and it loads the "It Works!" page. Now I'm ...
15
votes
3answers
22k views

Does curl have a timeout?

So far I couldn't find anything really, but is it true that curl doesn't really time out at all? user@host:~# curl http://localhost/testdir/image.jpg I'm asking because I'm redirecting any request ...
13
votes
2answers
11k views

How to avoid apache reload when rotating logs?

I use logrotate to rotate Apache access-, error- and rewrite-logs. My config file looks like this: /apache/*log { compress dateext rotate 365 size=+300M olddir /log/old/apache ...
9
votes
5answers
28k views

“Symbolic link not allowed or link target not accessible” / Apache on CentOS 6

I've got a brand new CentOS 6 installation, which has a symlink in the document root to my development files: [root@localhost html]# ls -l total 4 -rwxrwxrwx. 1 root root 0 Sep 18 20:16 index.html ...
7
votes
1answer
583 views

Opening port 80 but remain secure

I have a standard installation of Ubuntu 10.04, and have installed the LAMP stack so I can do some web development locally. On my router I have opened port 80 so I can develop with external services ...
7
votes
1answer
2k views

Throttling web crawlers

My website is being DoS'ed by Google webspiders. Google is welcome to index my site, but sometimes it is querying a tagcloud on my site faster than my webserver can produce the results, making my ...
6
votes
3answers
1k views

How can I set up Apache to use port 1 and other ports below 80?

The mysql user cannot use ports below 1024 because these are reserved for the root user. Apache, on the other hand, can use port 80. Apache runs as root before it runs as Apache and thus it can use ...
6
votes
1answer
755 views

httpd running as apache.apache, but logs owned by root.root?

ps shows my httpd processes as apache 29561 15186 0 15:30 ? 00:00:00 /usr/sbin/httpd I'm running Centos 5.3 All the log files in /var/log/httpd are owned by root. Howcome?
6
votes
3answers
13k views

How can I get TLSv1.2 support in Apache on RHEL6/CentOS/SL6?

I'd like to have TLSv1.2 support in Apache on my Scientific Linux 6 (RHEL6 rebuild) server. Is there some semi-supported pathway to getting this working? Preferably with minimal custom rebuilding. ...
6
votes
1answer
2k views

Blocking visitors that access by server IP address

My Apache Server IP address is 192.168.1.100 and the Domain Name is test.local. If a user types in the URL, say "http://test.local", then they should be allowed. If a user tries to access "http:// ...
6
votes
1answer
276 views

Apache Authorization for the Allowed Users?

I have read the answer to this question: http://stackoverflow.com/questions/4102763/apache-basic-authentication-except-for-those-allowed It helped me understand how to not authenticate some users ...
6
votes
3answers
4k views

A Web ssh/telnet client

I'm in kind of a tight spot right now. I wanted to know if someone has seen a HTML, or PHP web ssh client as both my company and school block everything besides port 80. I'm a control freak when it ...
6
votes
4answers
2k views

Case-insensitive file system for production server?

The initial situation looks like this: The corporate software is PHP-based. It is delivered by Apache 2 on a Windows 2003 Server. It is big. It is a legacy of rather unprofessional developers who ...
6
votes
1answer
20k views

apache2 Invalid command 'SSLEngine'

When I restart httpd, I get the following error. What am I missing? [root@localhost ~]# service httpd restart Stopping httpd: [ OK ] Starting httpd: ...
6
votes
1answer
288 views

Unkillable apache2 processes

After upgrading from debian lenny to squeeze (apache2 2.2.16-6+squeeze4 and php 5.3.10-1~dotdeb.1), my apache processes started to exit with segmentation fault. It happens every 5-30 minutes (for 1 ...
5
votes
3answers
9k views

Missing init.d/apache2 file

I am new to linux and just recently messed up my first apache/tomcat configuration. After trying to delete apache and tomcat, and now trying to reinstall apache 2, I am missing the init.d/apache2 file ...
5
votes
4answers
7k views

How do I create web pages in my home directory and have the web server serve them in my web browser?

I have recently installed the Apache web browser in my Debian Squeeze (using command tasksel and selecting [ ] Web server). Now I get it to start via sudo /etc/init.d/apache2 start and then I go to my ...
5
votes
3answers
12k views

Apache installation configuration can't find PCRE? ( pcre-config for libpcre not found )

These are the requirements and instructions on how to install Apache on Linux. http://httpd.apache.org/docs/current/install.html So I've installed everything (c++ compiler, apr and apr-util) to be ...
5
votes
2answers
1k views

Permissions: What's the right way to give Apache more user permissions?

Context: I am making an in-browser control panel that gives me one button access to a library of scripts (.sh and .php) that I've written to process various kinds of data for a project. It's a "one ...
5
votes
1answer
285 views

“403 Forbidden - You don't have permission to access / on this server” - apache2 localhost on Linux Mint 17

Desired Behaviour To be able to access localhost in browser without getting 403 Forbidden message. Current Behaviour Navigating to localhost in browser returns: Forbidden You don't have permission ...
5
votes
3answers
868 views

Apache server starts automatically after stopping the service

What can cause httpd to start automatically after stopping it? In a bash script I need to first stop apache web server. This is the script: apachectl stop; while pgrep httpd; do sleep 1; done echo ...
5
votes
2answers
5k views

Localhost .htaccess not working on Ubuntu

I have been trying to get my .htaccess file to work on my localhost. I know that the file works because it is on my server and works. However it doesn't seem to be working locally. I have followed ...
5
votes
1answer
918 views

Apache, Group Permissions and User Uploads

I have a folder named "digitalgoods" with the following ownership -- apache:apache residing outside of the htdocs folder and is therefore not accessible to the public. However I need the same folder ...
5
votes
2answers
3k views

How do I install mod_pagespeed using apt-get?

I remember seeing an article at one time on how to do this, but now I can't find it. I have seen other install directions. I want to make sure I can easily update it via apt.
5
votes
1answer
395 views

How can I setup Apache on Linux to stream WMV-HD to Xbox 360?

What I am looking for is a free and open source solution. If the distro I use matters, it is Open SUSE. VLC supports only WMV1&2.
5
votes
1answer
117 views

Slow ikiwiki after first run

I have local ikiwiki on my notebook (with apache as local webserver). When I save an edit the first time after booting and logging in, saving is very slow (but the second time saving is at normal ...
4
votes
2answers
2k views

Sync with a Directory Listing of An Apache Server

Is there an easy way to keep a folder synced with a directory listing via HTTP? Edit: Thanks for the tip with wget! I created a shell script and added it as a cron job: remote_dirs=( ...
4
votes
3answers
15k views

CentOS - install using yum Apache 2.4

I need Apache 2.4 in CentOS because with Apache 2.2 mod_proxy_wstunnel is not possible. I have tried https://fedorahosted.org/SoftwareCollections/ but unfortunately its for RHEL after installing i ...
4
votes
3answers
771 views

Apache refuses to start on any port

I can't seem to get Apache to start on any port. I'm always getting the error: apache2(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 I checked to make sure that ...
4
votes
1answer
2k views

Apache fails to reload… Is there a log that I can look in for details?

I have a webserver that I'm working on adding a site to. After running a2ensite, I ran service apache2 reload, and got this: [FAIL] Reloading web server config: apache2 failed! Is there a log ...
4
votes
1answer
2k views

recovering deleted file held open by apache?

suppose an apache log file gets deleted but its held open by apache then this is what i am doing. pid=$(lsof | grep text.txt | awk '/deleted/ {print $2}') fd=$(lsof | grep text.txt | awk '/deleted/ ...
4
votes
3answers
4k views

Cannot Compile Apache: “Error, SSL/TLS libraries were missing or unusable”

Arch Linux 2011.08.19 (Linux 3.4.2 i686) Apache 2.2.22 → 2.2.22 (recompile & reinstall) OpenSSL 1.0.1.c-1 These details are likely irrelevant, but: I’m using yaourt with customizepkg to build ...
4
votes
3answers
3k views

Why put some config info in conf/httpd.conf and some in files in the conf.d folder?

The main apache config file is in /etc/httpd/conf/httpd.conf on my CentOS system an in there is a line: Include conf.d/*.conf Inside conf.d is mostly files that do something like this: LoadModule ...
4
votes
3answers
867 views

How do I find where Apache keeps the log files?

I need to find where Apache is keeping the access and error logs for a site. I have root access to a server where dozens of sites are hosted. I'm trying to debug one of those sites. When I browse the ...
4
votes
2answers
25k views

How to configure SSL in apache?

I have installed apache in RHEL 6. Everything is working fine. What all changes and configurations should be done to use https://localhost:443/. If I change the "Listen 80" to 443 it is throwing an ...
4
votes
3answers
9k views

How do I fix the error 403 I am getting with XAMPP while I am using mod_userdir?

I am running Arch Linux and I decided to use XAMPP so I can create and test web pages. Anyway, I followed the instructions given in the site and extracted it to /opt/lampp and I also uncommented the ...
4
votes
1answer
1k views

Bash, remove lines containing string with grep

This is currently deleting the whole contents of the file in question: #!/bin/bash rpc_port="9201"; dir="/etc/apache2/ports.conf" cat $dir | grep -v "Listen $rpc_port" > $dir The file contents: ...
4
votes
2answers
616 views

apache and php Segmentation fault [closed]

I have recently migrated to Archlinux. I installed Apache, php and mysql according to the Arch Linux LAMP wiki page. Now I have setup a virtual host for my new Symfony project. For every request I ...
4
votes
1answer
141 views

If I'm logged in as root, how do I restart mysql or apache with options?

I know the commands to restart/stop/start, but when I try to pass options it doesn't seem to work! CENTOS 6, MySQL 5.14 service mysql restart service httpd restart Then I tried this: ...
4
votes
2answers
12k views

Execute shell script from php, as root user?

Need to execute the following line from PHP: $res = shell_exec('sudo sh /home/nicklas/cronjobs/make_account.sh username password'); The problem is nothing happens on execution. If i try to ...
4
votes
1answer
1k views

How to configure permissions to allow apache to securely have access to a file in a shared environment?

This is a follow up question from my previous, but I felt it might be more Linux based. http://serverfault.com/questions/414207/how-to-set-linux-permissions-to-allow-apache-to-have-access-to-a-file ...
4
votes
2answers
862 views

Limiting the Size of Apache HTTPD Memory Footprint

I have a web server running Cent OS 5 with Apache. I have over 1GB of Ram and the MaxSpareServers set to 15. This would be fine under most situations, but for some reason my httpd processes are ...
4
votes
1answer
155 views

How to set a directory's permissions for group read/execute access

I am running Arch and have just install XAMPP. I have change changed my document root to /srv which is a separate EXT4 partition. I have set the Apache HTTP server to use a group called "http". I have ...
4
votes
2answers
1k views

Access VirtualBox Debian Apache Guest on Windows Host

I am running Oracle VirtualBox with Debian as guest OS on a Windows 7 host. I have installed Apache and specified the following two network adapters in VM: Bridge Host-only w/ the same IP set as ...
4
votes
1answer
5k views

Where do I set FollowSymLinks?

I have just set up an Apache 2.2 server on a new Linux Mint installation. I am recreating a previous set up I had on an old Ubuntu machine. On my previous computer, I had to enable FollowSymLinks in ...
4
votes
2answers
850 views

How to set secure permissions for multiple users and multiple websites?

On a Gentoo 3.2.12 server with apache2+php, there are several websites running: /www /website1 /website2 ...etc The apache user should have read-only access to all the websites. There ...
4
votes
2answers
336 views

Apache 2.4 won't reload, any problem with my configuration?

I'm trying to get a VirtualHost file which was written in Apache 2.2 to work in Apache 2.4 and while I've done some changes to it, it doesn't pass the Apache configtest. The idea is to locally test ...
4
votes
1answer
90 views

How do you give a developer group access to apache, MySQL, php and the webroot?

We have 3 web designers that are currently logging in to our server via root to configure apache and setup websites. I have very basic linux knowledge (I'm a web designer) and have created users and ...