Freebsd apache rotation log / change directory
add this line at ee /etc/newsyslog.conf
# Rotating Apache log ~ Dipetik dari : http://mikkel.hoegh.org/blog/2009/oct/8/rotating-apache-httpd-logfiles-freebsd
#/var/log/httpd-access.log www:www 440 9 * $W1D4 J /var/run/httpd.pid 30
/data/log/httpd-access.log www:www 440 9 * $D11 J /var/run/httpd.pid 30
/var/log/httpd-error.log www:www 440 9 * $W1D4 J /var/run/httpd.pid 30
after adding at httpd.conf
search http-access.log
CustomLog "/data/log/httpd-access.log" combined
and adding / replace at vhost.conf (if you using vhost)
CustomLog "/data/log/httpd-access.log" common
Restart Apache
Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts
Monday, June 20, 2011
Tuesday, August 31, 2010
APR-1 Apache upgrade problem
I face a problem when i want to upgrade apache form 2.2.14 to 2.2.16.
When the upgrade is running the running stop at apr-1
than this step save my life.
It wasn't clear to me, but, in the end I uninstalled apr1, and then let the 'apache install' reinstall it. Here's the sequence that worked for me
pkgdb -F;portsclean -CDD;portsnap fetch update
cd /usr/ports/www/apache22
make deinstall clean
portupgrade -f -o devel/apr1 devel/apr
cd /usr/ports/devel/apr1
make deinstall clean
cd /usr/ports/www/apache22
make install clean
Taken from http://forums.freebsd.org/archive/index.php/t-14338.html
When the upgrade is running the running stop at apr-1
than this step save my life.
It wasn't clear to me, but, in the end I uninstalled apr1, and then let the 'apache install' reinstall it. Here's the sequence that worked for me
pkgdb -F;portsclean -CDD;portsnap fetch update
cd /usr/ports/www/apache22
make deinstall clean
portupgrade -f -o devel/apr1 devel/apr
cd /usr/ports/devel/apr1
make deinstall clean
cd /usr/ports/www/apache22
make install clean
Taken from http://forums.freebsd.org/archive/index.php/t-14338.html
Thursday, May 6, 2010
Hidden Apache directory listing
If you are on an RPM installation of Apache (which i dont really recommend) you will find the apache configuration file probably here:
/etc/httpd/conf/httpd.conf
If you are using apache from the source tar balls ( like real men ) probably you will find the configuration file here:
/usr/local/apache/conf/httpd.conf
Using an editor like vi , edit the httpd.conf file and scroll until you find a line like this:
Options All Indexes FollowSymLinks MultiViews
To disable directory browsing carefully remove the line that says: Indexes and leave the line like this:
Options All FollowSymLinks MultiViews
Restart your apache webserver and thats it
reference http://www.felipecruz.com/blog_disable-directory-listing-browsing-apache.php
/etc/httpd/conf/httpd.conf
If you are using apache from the source tar balls ( like real men ) probably you will find the configuration file here:
/usr/local/apache/conf/httpd.conf
Using an editor like vi , edit the httpd.conf file and scroll until you find a line like this:
Options All Indexes FollowSymLinks MultiViews
To disable directory browsing carefully remove the line that says: Indexes and leave the line like this:
Options All FollowSymLinks MultiViews
Restart your apache webserver and thats it
reference http://www.felipecruz.com/blog_disable-directory-listing-browsing-apache.php
Sunday, June 28, 2009
Apache22 LDAP integration on FreeBSD
Finally I make it doing apache22 auth using LDAP
the solution
open your apache configuration httpd.conf and add this lines
Directory /path/directory/toauth>
Order deny,allow
Deny from All
AuthName "Please Login Using password"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL ldap://xxx.xx.xxx.xx:389/
Require valid-user
Satisfy any
/Directory>
restart your apache
the solution
open your apache configuration httpd.conf and add this lines
Directory /path/directory/toauth>
Order deny,allow
Deny from All
AuthName "Please Login Using password"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL ldap://xxx.xx.xxx.xx:389/
Require valid-user
Satisfy any
/Directory>
restart your apache
Wednesday, June 24, 2009
To remove Parent Directory
Ok I already remove "Parent Directory" from Apache22 on BSD platform
- open your httpd.conf
- add this
Directory /data/yogya/>
IndexIgnore ..
/Directory>
- save and restart
- done
ps: please add < into the script directory.
- open your httpd.conf
- add this
Directory /data/yogya/>
IndexIgnore ..
/Directory>
- save and restart
- done
ps: please add < into the script directory.
Monday, June 22, 2009
Apache Aut
Apache authorised for single mode.
now I already done doing apache auth in single mod
here the step
edit http.conf
add the following line in http.conf
#
#apache permission testing
#
Directory /directory/to/auth/>
AllowOverride AuthConfig
/Directory>
#
ps: please put < at the begining of file Directory /directory/to/auth and /Directory because i cannot put right now because it will hidden that conf if i put < now.
Create a file /directory/to/auth/.htaccess in that director that looks something like this:
AuthName "Add your login message here."
AuthType Basic
AuthUserFile /directory/to/auth/.htpasswd
AuthGroupFile /dev/null
require user name-of-user
after that create the file .htpasswd to /directory/to/auth/ (to store password for user)
after that run this htpasswd -c .htpasswd name-of-user
and
restart apache
done for single user
now I try to auth with LDAP and stil searching the conf. I will let share with you guys if my work done.
taken at : http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html
Thanks
now I already done doing apache auth in single mod
here the step
edit http.conf
add the following line in http.conf
#
#apache permission testing
#
Directory /directory/to/auth/>
AllowOverride AuthConfig
/Directory>
#
ps: please put < at the begining of file Directory /directory/to/auth and /Directory because i cannot put right now because it will hidden that conf if i put < now.
Create a file /directory/to/auth/.htaccess in that director that looks something like this:
AuthName "Add your login message here."
AuthType Basic
AuthUserFile /directory/to/auth/.htpasswd
AuthGroupFile /dev/null
require user name-of-user
after that create the file .htpasswd to /directory/to/auth/ (to store password for user)
after that run this htpasswd -c .htpasswd name-of-user
and
restart apache
done for single user
now I try to auth with LDAP and stil searching the conf. I will let share with you guys if my work done.
taken at : http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html
Thanks
Subscribe to:
Posts (Atom)