All posts by Michael Albert

Apache: Enable Server side includes SSI for a virtual directory

Hi,

short post as reminder how to enable Server Side Includes on a virtual directory.

mod_include must be enabled. MimeType for text/html must associated with .shtml file extension. Sample config for SSI looks like these:


<Directory "D:/user/www/virtualdirectory/">
    Options Indexes FollowSymLinks MultiViews ExecCGI Includes
    AllowOverride All
    Order allow ,deny
    Allow from all
    Require all granted
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</Directory>

See you Michael

Apache: Alias directive for virtual directory returns HTTP Error 403

Hi,

I have added a virtual directory to an apache web server and the virtual directory is located outside the document root. I configured the httpd.conf how it is decripted in the apache doc

When I access the virtual directory an error “Access forbidden! Error 403” occured. The config seems to ok:

Alias /virtualdirectory/ "D:/user/www/virtual/"
<Directory "D:/user/www/virtual/">
   Options Indexes FollowSymLinks MultiViews ExecCGI
   AllowOverride All
   Order allow,deny
   Allow from all
</Directory>

Solution:

The default apache configration is very restrictive. It do not allow to access directories without authentication. This is defined in the Directory section of httpd.conf:


<Directory>
   AllowOverride none
   Require all denied
</Directory>

Add a “require all granted” directive to your virtual directory section will grant the access.

Alias /virtualdirectory/ "D:/user/www/virtual/"
<Directory "D:/user/www/virtual/">
   Options Indexes FollowSymLinks MultiViews ExecCGI
   AllowOverride All
   Order allow,deny
   Allow from all
   Require all granted
</Directory>

Windows 7 & Getting drivers for obsulete printers

Hello,

yesterday a customer had the problem that he wants an old printer, a HP LaserJet 5M, to get running on 15 Windows 7 clients. Unfortunately Windows has no driver on board and the manufactorer didn’t provider anyone.

Solution:

For many old printers you can install a driver via Windows Update. Go to the Control Panel, Device & printers and add a new printer

WindowsUpdate
Add printer driver from Windows update, to get the whole drivers list from windows update may take some time.Time for a coffee.

Continue reading Windows 7 & Getting drivers for obsulete printers

Windows: Changing the power plan or a single value in a sheme

This posts descripes how to change the power plan in Windows or a single option in a sheme from the Windows command line.

First of all start a cmd command shell  with administrator rights.

To get a list of all available shemes run


c:\> powercfg /L


Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver)

The most options to powercfg at the command line must be specified with the GUID. To set the “High performance” plan active determine the sheme  GUID and execute

c:\> powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Query again und you see the other plan is active

c:\> powercfg /L
Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance) *
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver)

Let us supose we only want to modify a single option or value. For example, disable the “Allow hybrid sleep” value in sheme “Power Saver” and with AC power active. Then, you first have to query all of the content of a sheme, because we need the GUID as parameter for powercfg. The output is a long list of options, I redirect them in  a temporary file, because in the file it is easier to search for the necessary GUIDs.
Continue reading Windows: Changing the power plan or a single value in a sheme