LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-23-2011, 07:59 AM   #1
SAYGIN
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
open_basedir enabling for exiting websites


Hi, i want to add a open_basedir line to my apache configurations file.

I want to add this line.

php_admin_value open_basedir "/chroot/home/$USERNAME/:/usr/share/pear/:/tmp/:/var/lib/php/session/"

My configurations file located on : /etc/httpd/conf.d

Conf file prefix vhost_***.conf

Sample conf file.

Code:
<VirtualHost 77.79.92.21:80>

  SuexecUserGroup examplecomtr examplecomtr

  DocumentRoot /home/examplecomtr/example.com.tr/html
  ServerName example.com.tr

  ServerAlias www.example.com.tr ftp.example.com.tr mail.example.com.tr
  ServerAdmin webmaster@example.com.tr

  # subdomain logic
  RewriteEngine On
  RewriteOptions inherit
  RewriteCond %{HTTP_HOST} !^www\.example\.com\.tr [NC]
  RewriteCond %{HTTP_HOST} !^example\.com\.tr [NC]
  RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-.]+)\.example\.com\.tr [NC]
  RewriteCond %{DOCUMENT_ROOT}/%1 -d
  RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
  RewriteRule ^([0-9A-Za-z-.]+)\.example\.com\.tr/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]

  RewriteCond %{HTTP_HOST} ^www\.([A-Z0-9a-z-.]+)\.example\.com\.tr [NC]
  RewriteCond %{DOCUMENT_ROOT}/%1 -d
  RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
  RewriteRule ^www\.([0-9A-Za-z-.]+)\.example\.com\.tr/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
  # end subdomain logic

  ErrorLog /home/examplecomtr/var/example.com.tr/logs/error.log
  CustomLog /home/examplecomtr/var/example.com.tr/logs/transfer.log combined

  # php: default  don't edit between this and the "end php" comment below
  <IfModule mod_suphp.c>
    suPHP_Engine On
    suPHP_UserGroup examplecomtr examplecomtr
    AddHandler x-httpd-php .php
    suPHP_AddHandler x-httpd-php .php
    suPHP_ConfigPath /home/examplecomtr/etc
  </IfModule>

  <IfModule !mod_suphp.c>
    <IfModule mod_php5.c>
      php_admin_flag engine On
    </IfModule>
    <IfModule mod_php4.c>
      php_admin_flag engine On
    </IfModule>
  </IfModule>
  # end php

  # cgi: 1 don't edit between this and the "end cgi" comment below
  <Directory /home/examplecomtr/example.com.tr/html>
    AllowOverride  All
  </Directory>

  <Location />
    Options +ExecCGI
  </Location>
  ScriptAlias /cgi-bin/ /home/examplecomtr/example.com.tr/html/cgi-bin/
  # end cgi

</VirtualHost>
How can i read username from this file and write a open_basedir ?

Thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open_basedir for exiting websites SAYGIN Linux - Newbie 0 11-24-2011 09:47 AM
Exiting BASH function without exiting sourced environment SwingingSimian Programming 10 08-12-2009 12:59 AM
how to colse mod_userdir $ open_basedir from shell ? aldesha989 Programming 7 01-17-2009 06:51 PM
open_basedir ballistic509 Debian 2 08-17-2006 01:30 PM
Plesk open_basedir problem!! RKris Linux - Software 0 12-04-2003 06:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration