ZAWRNWZIZV ?
subscribe to apache RSS feed

Home :.: About :.: Contact :.: Archives :.: Bookmarks :.: WishList

My server has A LOT of Internal Dummy Dummy Connections in the form of:

127.0.0.01 – - [date] "OPTIONS * HTTP/1.0" 200 -

image Submit

These seem to be Internal Dummy Connections: http://wiki.apache.org/httpd/InternalDummyConnection Submit (i am running Apache/2.2.3 (CentOS) so I ALSO need to upgrade so it seems but that is uhm very difficult when Plesk is installed and there are dependencies that I do not even know of).

And they happened after I changed the host file on my Linux Server (etc/hosts). I changed the hosts file to 2 lines instead of one because otherwise the WordPress Cron functionality would not run (see http://bradt.ca/archives/fix-wordpress-missed-schedule-error-on-media-temple-dv-plesk/ 1/3) which has todo with plesk (http://www.fdcservers.net/vbulletin/archive/index.php/t-1018.html Submit).

127.0.0.1       localhost localhost.localdomain
205.186.136.89  farmvillechicken.com farmvillechicken

Directly after making these changes the internal Dummy Connections started entering my /var/log/httpd/access_log ‘s

The Apache Help page says the following:

If you wish to exclude them from your log, you can use normal conditional-logging techniques. For example, to omit all requests from the loopback interface from your logs, you can use

SetEnvIf Remote_Addr "127\.0\.0\.1" loopback

and then add env=!loopback to the end of your CustomLog directive.

However… the "normal conditional logging techniques" are unknown to me… Via

http://httpd.apache.org/docs/2.0/mod/mod_log_config.html 0/78 I think the CustomLog line is correct:

SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log common env=!loopback
CustomLog logs/referer_log referer env=!loopback
CustomLog logs/agent_log agent env=!loopback

So let’s add that to /etc/httpd/conf/httpd.conf and run /usr/sbin/apachectl configtest:

Syntax error on line 485 of /etc/httpd/conf/httpd.conf:SetEnvIf regex could not be compiled.

(to show line number in vi you can use ":set number")

ah… I forgot to put a "." before the "1" in the regex…. save: Syntax OK.

Let’s reboot by doing a /etc/init.d/httpd restart and then check the log files.

image Submit 

GRBML! It did not work. Let’s head for a forum Submit.


 apache

 issue

Monday, May 17th, 2010

 Add a Comment


image I heard about OpenGoo 8/21K, a webapplication which you can host at your own server and basically let’s you do the “office” things: contacts, todo, documents, spreadsheets, calender, task, links, and so on.

Although it probably lacks a lot of features this might be handy to install in our household. I really like to have all my data within my own household and I believe distributed everything is basically the way to go.

The main problem are the memory demands, it requires really some MB’s while my Synology CS 407 is already running uhm… a lot.

But let’s try anyway.

image - Download the zip file from the SourceForge site
- Just copy to your /web directory
- Open the installation page by just typing in the url of the place you copied it to (e.g. http://cubestation/doc)
- You get a  nice message and have to click next
image - The next page warns you aboutsimplexml extension Submit is not installed”
- According to Synology Submit however this extension is not available yet in their default php release (no libxslt.so). However I read about  some “hack” : “install a second apache with a full enabled PHP —> ipkg install php-apache”.

Some questions pop in my mind now… ah…. what the heck.

CubeStation> ipkg list php*
php – 5.2.6-2 – The php scripting language
php-apache – 5.2.6-1 – The php scripting language, built as an apache module
php-curl – 5.2.6-2 – libcurl extension for php
php-dev – 5.2.6-2 – php native development environment
php-embed – 5.2.6-2 – php embedded library – the embed SAPI
php-fcgi – 5.2.6-1 – The php scripting language, built as an fcgi module
php-gd – 5.2.6-2 – libgd extension for php
php-imap – 5.2.6-2 – imap extension for php
php-ldap – 5.2.6-2 – ldap extension for php
php-mbstring – 5.2.6-2 – mbstring extension for php
php-mssql – 5.2.6-2 – mssql extension for php
php-mysql – 5.2.6-2 – mysql extension for php
php-odbc – 5.2.6-2 – odbc extension for php
php-pear – 5.2.6-2 – PHP Extension and Application Repository
php-pgsql – 5.2.6-2 – pgsql extension for php
php-thttpd – 2.25b-5.2.6-1 – php-thttpd is thttpd webserver with php support
phpmyadmin – 2.6.2-2 – Web-based administration interface for mysq

ipkg list php* hmmm…

CubeStation> ipkg install php-apache
Installing php-apache (5.2.6-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/php-apache_5.2.6-1_arm.ipk Submit
package apr-util suggests installing sqlite
package apr-util suggests installing openldap-libs
Installing apache (2.2.10-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/apache_2.2.10-1_arm.ipk Submit
Installing apr (1.3.3-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/apr_1.3.3-1_arm.ipk Submit
Installing apr-util (1.3.4-2) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/apr-util_1.3.4-2_arm.ipk Submit
Installing e2fslibs (1.40.3-5) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/e2fslibs_1.40.3-5_arm.ipk Submit
Installing expat (2.0.1-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/expat_2.0.1-1_arm.ipk Submit
Installing gdbm (1.8.3-2) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/gdbm_1.8.3-2_arm.ipk Submit
Installing libdb (4.2.52-3) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/libdb_4.2.52-3_arm.ipk Submit
Installing e2fsprogs (1.40.3-5) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/e2fsprogs_1.40.3-5_arm.ipk Submit
Installing openssl (0.9.7m-4) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/openssl_0.9.7m-4_arm.ipk Submit
Installing zlib (1.2.3-3) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/zlib_1.2.3-3_arm.ipk Submit
Installing openldap-libs (2.3.43-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/openldap-libs_2.3.43-1_arm.ipk Submit
Installing cyrus-sasl-libs (2.1.22-2) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/cyrus-sasl-libs_2.1.22-2_arm.ipk Submit
Installing php (5.2.6-2) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/php_5.2.6-2_arm.ipk Submit
Installing bzip2 (1.0.5-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/bzip2_1.0.5-1_arm.ipk Submit
Installing libxml2 (2.7.1-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/libxml2_2.7.1-1_arm.ipk Submit
Installing libxslt (1.1.24-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/libxslt_1.1.24-1_arm.ipk Submit
Installing pcre (7.8-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/pcre_7.8-1_arm.ipk Submit
Installing libstdc++ (6.0.3-6) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/libstdc++_6.0.3-6_arm.ipk Submit
Configuring apache
update-alternatives: Linking //opt/sbin/htpasswd to /opt/sbin/apache-htpasswd
update-alternatives: Linking //opt/sbin/httpd to /opt/sbin/apache-httpd
httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.70 for ServerName
httpd (no pid file) not running
httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.70 for ServerName
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
Unable to open logs
postinst script returned status 1
ERROR: apache.postinst returned 1
Configuring apr
Configuring apr-util
Configuring bzip2
update-alternatives: Linking //opt/bin/bzip2 to /opt/bin/bzip2-bzip2
Configuring cyrus-sasl-libs
Configuring e2fslibs
Configuring e2fsprogs
update-alternatives: Linking //opt/bin/chattr to /opt/bin/e2fsprogs-chattr
update-alternatives: Linking //opt/bin/lsattr to /opt/bin/e2fsprogs-lsattr
update-alternatives: Linking //opt/sbin/fsck to /opt/sbin/e2fsprogs-fsck
Configuring expat
Configuring gdbm
Configuring libdb
Configuring libstdc++
Configuring libxml2
Configuring libxslt
Configuring openldap-libs
Configuring openssl
Configuring pcre
Configuring php
Configuring php-apache
Configuring zlib
Successfully terminated.

1) vi /opt/etc/apache2/httpd.conf

(in /opt/lib/php/extensions is now the needed xsl.so)

(also change all libexec/bla.so to /opt/libexec/…)
(also change log file to correct location e.g. /opt/var/apache2/log)

Then edited the portnumber to 81 and changed the default webpath.

2) run /opt/sbin/httpd –k start

and we are running another instance on port 81:

image


 apache

 coding

 linux

 php

 synology

Wednesday, November 19th, 2008

 Add a Comment


The webserver out-of-the-box works great on the NAS but it was not so handy that I only had 1 documentroot, meaning: http://cubestation Submit and http://cubestation/leau Submit would both have as root http://cubestation Submit. This is unhandy because I have seperate sites on the cube which have html code that is often relative to the root. Meaning: I have to rewrite the code or use some hacks.

However, with the help of synology.nl forum Submit and the help of Patrick on the synology.com forum Submit I managed to get it working.

I edited /usr/syno/apache/conf/httpd.conf-user and uncommented the virtual hosts line:

Include conf/extra/httpd-vhosts.conf

Then I added the conf/extra/httpd-vhosts.conf and added 1 subsite to test “leau.cubestation” :

NameVirtualHost *:80
<VirtualHost *:80>
  ServerName cubestation
  DirectoryIndex index.php index.html index.htm index.shtml
  DocumentRoot /var/services/web
  <Directory “/var/services/web”>
   AllowOverride all
  </Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName leau.cubestation
DirectoryIndex index.php index.html index.htm index.shtml
DocumentRoot /var/services/web/leau
<Directory “/var/services/web/leau”>
  AllowOverride all
</Directory>
</VirtualHost>

And then I added this new subsite to the /etc/hosts file:

127.0.0.1       localhost
192.168.1.70    CubeStation
192.168.1.70    leau.cubestation

After a reboot it works perfectly from my browser. I can now add all other websites as virtual roots to the cubestation without needing domain names.


 apache

 cubestation

 linux

 synology

Saturday, April 5th, 2008

 Add a Comment