Virtualization differences between stable and testing
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
I am looking at two Debian servers.
In my local machine I am running testing, and on a VM that will soon go live I run stable + backports.
Differences are stark, stable version does not have the .conf extension for default files in /etc/apache2/sites-available.
apache2.conf is quite different as well.
I am mostly concerned with virtualization directives.
In testing there is very little that is uncommented in default.conf files, so I entered virtualization directives as so:
:: Code ::

<VirtualHost notosh:80>
   
   ServerName dtest
   ServerAdmin webmaster@localhost
   DocumentRoot /var/www/html/dtest

   <Directory /var/www/html/dtest>

      Options All
      AllowOverride All
      Order allow,deny
      Allow from all

   </Directory>

   DirectoryIndex index.php

</VirtualHost>

This works for testing, where I have to add the .conf extension.
However, in stable the default file in sites-available looks like this:
:: Code ::

<VirtualHost *:80>
   ServerAdmin webmaster@localhost

   DocumentRoot /var/www
   <Directory />
      Options FollowSymLinks
      AllowOverride None
   </Directory>
   <Directory /var/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
   </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 ${APACHE_LOG_DIR}/error.log

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

   CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

So, I would like to create my vhosts by copying over this template and modifying it.
Now, I will have to modify AllowOverride from None to All in Directory /var/www/, but don't know what to do with the rest of the stuff.
Of course, DocumentRoot will have to be modified on a per site basis, same for ServerName.
DirectoryIndex I will add as well.
But, what about the rest of the stuff, should I keep it as is?
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
Today I got this email from the Debian Apache mailing list, which I am copying verbatim, seems like many people are aware of these problems.

:: Quote ::
Package: release-notes
Severity: normal

(Apache maintainers X-Debbugs-CC)

Hi,

Many changes in the way to handle configuration (e.g., configuration
files name must now end with .conf, semantic of access control, etc.)
may deserve to be documented in the Release Notes, or at least a pointer
to the upstream documentation. #721071 might be of interest.

http://httpd.apache.org/docs/2.4/upgrading.html

Regards

David

Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
This is what I said, the change in conf file forcing .conf ending, there were a few smaller changes too by the way.

The key one I think is moving almost all custom configs to .d/ user config diretories, which while painful is a really good change long term since it means you can always accept the new default config files which makes upgrades smoother.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
Options FollowSymLinks
Options Indexes FollowSymLinks MultiViews
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

What do these do?
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I believe they do pretty much what they say.

follow symbolic links. If a file is a symbolic link to another file, then treate it as a resource. If set to no, I assume it will only use real files, not symbolic links. For your purposes, that means leave this stuff alone.

I don't know what multiviews does, but google apache does:
httpd.apache.org/docs/current/content-negotiation.html

:: Quote ::
Multiviews

MultiViews is a per-directory option, meaning it can be set with an Options directive within a <Directory>, <Location> or <Files> section in httpd.conf, or (if AllowOverride is properly set) in .htaccess files. Note that Options All does not set MultiViews; you have to ask for it by name.

The effect of MultiViews is as follows: if the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*, and effectively fakes up a type map which names all those files, assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client's requirements.

MultiViews may also apply to searches for the file named by the DirectoryIndex directive, if the server is trying to index a directory. If the configuration files specify

DirectoryIndex index

then the server will arbitrate between index.html and index.html3 if both are present. If neither are present, and index.cgi is there, the server will run it.

If one of the files found when reading the directory does not have an extension recognized by mod_mime to designate its Charset, Content-Type, Language, or Encoding, then the result depends on the setting of the MultiViewsMatch directive. This directive determines whether handlers, filters, and other extension types can participate in MultiViews negotiation.


Translation: stick with the defaults unless you understand this and know why you'd change them, or have been told explicitly by some direction or instruction to change them.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
Thanks techadmin, will google more, experiment more and bother you less.
Promised, it is a new year's resolution so I can break it ;-)
Back to top
Display posts from previous:   

All times are GMT - 8 Hours