...slow, especially for large collections of images. Using unguessable URLs. This is fast (because Apache can deliver assets without going through Rails), but less secure. When going with the "unguessable...
...modify that expiry date. It turns out this can be done with a vanilla Apache installation in a relatively secure fashion. We encode URLs as /system/ ?t= &s=
...to a name or IP, without relying on DNS TTL The following describes various Apache 2.4+ VHost directives to reverse-proxy an application that does not want to be reverse...
...internal-domain/internal-path. Basic setup For this to work you need the following Apache modules: headers substitute proxy proxy_http filter ssl The basic VHost setup looks like this:
Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the site you're about to test is placed behind a...
...Passenger version is most likely out of date. Update the gem, then install the apache module again: sudo gem install passenger sudo passenger-install-apache2-module Follow any instructions. Update...
...new response header: X-Sendfile: /opt/www/awesome-project/shared/downloads/image.png When the response comes back from Rails to Apache for delivery, Apache will detect that header and replace the empty response body with the...
...contents. This trick frees up the expensive Rails/Passenger worker process and lets the lightweight Apache worker do the heavy lifting. You need to configure Apache to be aware of X...
You configured authentication in your Apache configuration that requires username and password but you want a single IP address, host or network to allow access without entering credentials you can...
When you are using Apache for development, it still accepts connections from everyone in the same network as you. In order to only allow requests to your Apache coming from...
...Listen 127.0.0.1:80 Listen 127.0.0.1:443 After the change stop and start your Apache and check with netstat that Apache no longer listens to 0.0.0.0: sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2...
...shell script to set one site as the current one. Call it just like this: apache-site makandra-com Note that it disables all other sites in your Apache configuration...
...Furthermore it will also enable the default site if that was available. When you call apache-site with no arguments, it will list all available sites. This script is part...
...space of another server using mod_proxy, ProxyPass and ProxyPassReverse, all requests in your Apache logs are logged with the IP address of the proxying server. The IP address of...
Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...
With SNI, you can have many virtual hosts with HTTPS sharing the same IP address and port, and each one...
If you want to use Require group $GROUPNAME on your default Apache installation like this: Order allow,deny Allow from all Options None AllowOverride all AuthName "Area 51" AuthType Basic...
If you want to have a new log file every day automatically, but avoid using logrotate, the CustomLog directive is...
...requests from redirecting-host.com to desired-host.com while keeping path and query params unchanged, change your Apache VHost to something like this: ServerName desired-host.com ServerAlias redirecting-host.com RewriteEngine On RewriteCond %{HTTP_HOST} !^desired-host.com...
If you want to know the exact hits on your website (or whatever logfile you want) for a specific date...
...the inverse of X-SendFile. It parses the multipart post in C inside your apache process and writes the files to disk. Once that work is done it changes the...
To check your apache2 config files for syntax errors run sudo apache2ctl configtest or shorter sudo apache2ctl -t Be aware that this does not guarantee a successful Apache startup. It...
...this to your vhost's configuration: RewriteLog "/tmp/rewrite.log" RewriteLogLevel 9 After that, restart your Apache httpd and tail the above logfile. When you are done and all is well: remember...
You probably need to activate X-Sendfile.
passenger-install-apache2-module --auto
...same URL. Network infrastructure may modify the ETag sent by your app. In particular Apache's mod_deflate appends a suffix -gzip or -br to your ETags. These ETags will...
...that JS and CSS are not cached by all browsers. In order to force Apache to add expiry dates to its response, add the attached .htaccess to the public directory...
...Expires: Thu, 07 Oct 2010 07:21:45 GMT to the httpd response. Configuring Apache Check that you have mod_expires enabled. You need it for the attached .htaccess to...
...only certain roles may access it. Also, if you have directory indexes activated in Apache, you screwed up big time. Modify your uploader like this: class NotesAttachmentUploader < CarrierWave::Uploader::Base...
...Manage Sound Card State (restore and store) anacron.service loaded inactive dead Run anacron jobs apache-htcacheclean.service loaded active running Disk Cache Cleaning Daemon for Apache HTTP Server apache2.service loaded active running...
...not running, you can use service --status-all: >service --status-all [ + ] acpid [ - ] alsa-utils [ - ] anacron [ + ] apache-htcacheclean [ - ] apache2 [ + ] apparmor [ + ] apport [ + ] avahi-daemon [ + ] avahi-dnsconfd [ - ] bluetooth ... + means running, - means not running...