Tag Archives: apache

Apache: ssl configuration

You need a dedicated httpd.conf nameserver to handle ssl (through virtualhost). A single virtualhost cannot be for both ssl (port 443) and non ssl (port 80) connection. => Create a NameVirtualHost *:443 and map it with a matching <VirtualHost *:443> node When restarting apache, if a warning such as NameVirtualHost *:443 has no VirtualHost definition, it simply means that a similar NameVirtualHost declaration exists somewhere else (in /etc/apache2/sites-enabled/ssl for instance). Then keep only one NameVirtualHost *:443 declaration (idem with port 80 or any NameVirtualHost declaration). Having mulitple identical NameVirtualHost declarations generates this warning.

Apache: ScriptAlias not allowed here (.htacces file)

ScriptAlias is simply not allowed in .htaccess file. If you set a ScriptAlias directive in .htaccess file, ScriptAlias not allowed here error will appear in your log (/var/log/apache2/error.log). In fact, .htaccess file configure the directory it is into, and its directories => you cannot use scriptalias. You must set it in httpd.conf or equivalent. To know which instructions are allowed in .htaccess file, download official documentation from http://httpd.apache.org. When you look for the directive you’re interested into, let say “Options” which is in the section “Options Directive”, you have a line in the top table called “Context”, if ‘.htaccess’ is […]

Apache2: Could not reliably determine the server’s fully qualified domain name

When restarting apache, I got the following error: Could not reliably determine the server’s fully qualified domain name After searching the web, I got rid of this quite simply: opened /etc/hosts in first line, after 127.0.0.1 I inserted “locahost.localdomain” as first entry (previously I had “localhost”) save the file restart apache That’s it. [source] http://forums.fedora-fr.org/viewtopic.php?id=16875 : post 19

Installing Trac on Debian with Apache2, mod_fcgid

I followed Trac instruction installation as you can find them on trac’s website (see debian specific instructions) and as described in my book. Anyway everything worked fine until the very last step, ie. when you create your project and go into your web browser to log into track. All I got was a page with the list of projects, and when i clicked on my project, I ended with an apache error: file not found. First things first, if you bypass Apache and use Trac own server (launch “tracd –port 8000 /path/to/your/project”) and connect to trac through your webbrowser (www.hostname.com:8000) […]

PHPMyAdmin: error in .htaccess file

When I access phpmyadmin on myserver with http://myservername/phpmyadmin, I successfuly have the login screen. When I try to access it using my domain name: http://mydomainname/phpmyadmin, I have an Apache 500 error. When looking at error.log, Apache tells us that Options FollowSymLinks is not expected to be found. (in /usr/share/phpmyadmin/.htaccess). Once commented out, all urls are working properly. This behavior is really strange because in both case Apache is reading .htaccess file!

Apache: NameVirtualHost directive not working

My NameVirtualHost directive is not working. I am running Apache2.2.3. I’ve read apache documentation on virtual host, and it’s not working, including cut & pasted code from this very documentation. Each time I replace <VirtualHost *> with <VirtualHost *:80>, when I run “apache2 -t” to test my configuration file, I have the following output: [error] VirtualHost *:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results And I do have put “NameVirtualHost *:80” before my <VirtualHost> directives as stated in the official documentation! => for now I continue without port filtering […]

Apache & VirtualHost

When you create a <VirtualHost *> directive, do not forget that any request matching ip filtering (“*”, i.e. any ip in our case) and NOT matching any ServerName directive in any VirtualHost section will be handled by the first defined VirtualHost section. For example, let say your domainname is “betmyhouse.com”, and you want a subdomain “dev.betmyhouse.com”. If in your httpd.conf, you have the following virtualhost definitions: <VirtualHost *> ServerName dev.betmyhouse.com DocumentRoot /projects/dev_tools/ </VirtualHost> Then any call, including http://betmyhouse.com will be directed to /projects/dev_tools. Therefore you should always put a first virtualhost declaration that will be used as default for all […]

Debian & Apache: error log location

On Debian, apache logs are located in /var/log/apache2/ (error.log for errors). When you have an apache error, check them it will give hints on the source of the problem (ex. incorrect .htaccess syntax)