7.10 ssl apache2

Author: admin  //  Category: linux, web design

For the records: http://ubuntuforums.org/showthread.php?t=4466&page=5

On Ubuntu 7.10

(as root)

# aptitude install ssl-cert
# mkdir /etc/apache2/ssl

Hardcoding cert lifetime based on this patch:
http://bugs.debian.org/cgi-bin/bugre…?bug=293821#22

# make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem

(Answer questions)

# a2enmod ssl

# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl

Modify it so it looks something like this

Code:
NameVirtualHost *:443
<virtualhost *:443>
ServerAdmin webmaster@localhost

SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem

DocumentRoot /var/www/
<directory />
Options FollowSymLinks
AllowOverride None
</directory>

<directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/
</directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</directory>

</virtualhost>

# sudo a2ensite ssl

don’t forget to modify /etc/apache2/sites-available/default

Code:
NameVirtualHost *:80
<virtualhost *:80>

__________________


Last edited by fortran01 : January 20th, 2008 at 06:34 PM. Reason: Correction

Reply With Quote

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Drupal Headache

Author: admin  //  Category: Open Source, drupal, web design

So apparently AN hosting, my shared host, did something with my Apache settings, and all of a sudden, users could not submit any content on my site. Specifically, any time you hit the “submit” button, whether it was for creating a node, or changing user settings, I would get “page could not be displayed” After doing quite a bit of research, I found this article
http://drupal.org/node/110219

I put the following in my .htaccess file in my Drupal install, and all was well with the world.

# Turn off mod_security filtering.
<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

In the News, literally

Author: admin  //  Category: life, technology, web design

I recently rolled out a huge new website for the school district I work for. Actually, 15 new sites, all using drupal, an open source content management system that I often talk about on this blog. I got in the paper, and thought I’d post it here to archive it. I love the last quote!!!

article1

article2

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Apache2 rewrite for URL redirects

Author: admin  //  Category: Open Source, technology, web design

If you have an old domain, that you want forwarded to a new domain, you can use the mod_rewrite module to automatically rewrite the url.

This should be put in the mod_rewrite section of the .htaccess file
under the root of the web server so that all requests for
yourolddomain.com are rewritten to yournewdomain.com

RewriteCond %{HTTP_HOST} ^yourolddomain.com$ [NC]
RewriteRule .* http://yournewdomain.com/ [L,R=301
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Drupal Session handling for multiple subdomains

Author: admin  //  Category: Open Source, drupal, web design

If you are having problems with cookies for multiple sites on the
same web server running drupal, make sure the following session
handlers are in the settings.php files for your site configuration.

I searched the drupal site thoroughly and found this thread, which lead me to my settings change.

http://drupal.org/node/56357

Here are the changes I made for each of my multiple drupal driven subdomains in settings.php

ini_set(’session.name’, ‘PHPSESSID’);
ini_set(’session.cookie_domain’, ‘.example.com’);
ini_set(’session.cookie_secure’, 0);

Where PHPSESSID is your unique cookie identifier (ex: MYUNIQUEID)
and .example.com = your fully qualified domain name, including any
subdomain prefix.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]