security with joomla.conf outside of webserver root problem - Joomla! Forum - community, help and support
hi,
after being hacked last week im trying secure site according faqs.
now have problem moving configuration.php outside of web root. followed steps , put code configuration.php
require( dirname( __file__ ) . '/../joomla.conf' );
?>
i placed joomla.conf 1 step before public_html directory.
visiting website gives me following not found error
/home/........../............/..../public_html/../joomla.conf) [function.main]: failed open stream: no such file or directory in /home/........../............/..../public_html/configuration.php on line 2
obviously im doing stupid here!
can tell me im missing?
after being hacked last week im trying secure site according faqs.
now have problem moving configuration.php outside of web root. followed steps , put code configuration.php
require( dirname( __file__ ) . '/../joomla.conf' );
?>
i placed joomla.conf 1 step before public_html directory.
visiting website gives me following not found error
/home/........../............/..../public_html/../joomla.conf) [function.main]: failed open stream: no such file or directory in /home/........../............/..../public_html/configuration.php on line 2
obviously im doing stupid here!
can tell me im missing?
hi!
if create file called absolute_path.php in public space, one:
and call file "via url" (i.e: http://www.yourdomain.pim/absolute_path.php) ..returns absolute path.
example:
your absolute path /var/www/user/public_html
and move "joomla.conf" file, inside public space, directory called "private_html" absolute path file is:
and line of code:
..makes half of work (give absolute path "joomla! files" , yo must give rest.)
where the "joomla.conf in sample"?
in sample, pointing right file.
this one, works creating "private zone public zone", maybe want create private zone, not inside "public_html"..
well, in case , following example, can create "after user directory" directory called "private_html" then, absolute path "joomla.conf" when move directory, out of "public_html" is:
and code in configuration.php file can one:
(the absolute path joomla.conf file)
when work, don't forguet, remove "absolute_path.php" file or configure , give "right chmod" , "restriction access" "private zone" (inside or outside "public_html")
sorry english.. hope can understand. (you can read again , in right english published info issue)
bye!
if create file called absolute_path.php in public space, one:
code: select all
<?php echo dirname( __file__ ); ?>
and call file "via url" (i.e: http://www.yourdomain.pim/absolute_path.php) ..returns absolute path.
example:
your absolute path /var/www/user/public_html
and move "joomla.conf" file, inside public space, directory called "private_html" absolute path file is:
code: select all
/var/www/user/public_html/private_html/joomla.conf
and line of code:
code: select all
require( dirname( __file__ ) . '/../joomla.conf' );
..makes half of work (give absolute path "joomla! files" , yo must give rest.)
where the "joomla.conf in sample"?
code: select all
require( dirname( __file__ ) . '/private_html/joomla.conf' );
in sample, pointing right file.
this one, works creating "private zone public zone", maybe want create private zone, not inside "public_html"..
well, in case , following example, can create "after user directory" directory called "private_html" then, absolute path "joomla.conf" when move directory, out of "public_html" is:
code: select all
/var/www/user/private_html/joomla.conf
and code in configuration.php file can one:
code: select all
require( '/var/www/user/private_html/joomla.conf' );
(the absolute path joomla.conf file)
when work, don't forguet, remove "absolute_path.php" file or configure , give "right chmod" , "restriction access" "private zone" (inside or outside "public_html")
sorry english.. hope can understand. (you can read again , in right english published info issue)
bye!
Comments
Post a Comment