Different php_value open_basedir based on domain name in .htaccessHow to limit user e-mail sending in shared hosting enviroment - LAMP stackApache outputs all urls of a second domain as a subfolder of the primary domain nameRedirect HTTP requests based on subdomain address without changing accessed URL?htaccess - mask and redirect domain to sub directory on shared hostingHow to customize PHP configuration per Virtual Host under PleskHow do I use .htaccess conditional redirects for multiple domains?Setup secure shared hosting (Apache, PHP, MySQL)LAMP server hosting multiple domains - how to ensure each domain's files and users locked to only that domain?Techniques for securing mod_php for shared hosting (WAMP)?Apache2 give access to specific locations (.htaccess file)
How can I close a gap between my fence and my neighbor's that's on his side of the property line?
Why are notes ordered like they are on a piano?
How to implement float hashing with approximate equality
Airbnb - host wants to reduce rooms, can we get refund?
Can fracking help reduce CO2?
When and why did journal article titles become descriptive, rather than creatively allusive?
Why is the SNP putting so much emphasis on currency plans?
How to efficiently calculate prefix sum of frequencies of characters in a string?
Field Length Validation for Desktop Application which has maximum 1000 characters
Map one pandas column using two dictionaries
Is Cola "probably the best-known" Latin word in the world? If not, which might it be?
Selecting a secure PIN for building access
Was the ancestor of SCSI, the SASI protocol, nothing more than a draft?
What happened to Ghost?
Binary Numbers Magic Trick
Why debootstrap can only run as root?
Why was Germany not as successful as other Europeans in establishing overseas colonies?
What is the most remote airport from the center of the city it supposedly serves?
If Melisandre foresaw another character closing blue eyes, why did she follow Stannis?
Is this homebrew race based on the Draco Volans lizard species balanced?
How to reply this mail from potential PhD professor?
How do I tell my manager that his code review comment is wrong?
Can commander tax be proliferated?
Power LED from 3.3V Power Pin without Resistor
Different php_value open_basedir based on domain name in .htaccess
How to limit user e-mail sending in shared hosting enviroment - LAMP stackApache outputs all urls of a second domain as a subfolder of the primary domain nameRedirect HTTP requests based on subdomain address without changing accessed URL?htaccess - mask and redirect domain to sub directory on shared hostingHow to customize PHP configuration per Virtual Host under PleskHow do I use .htaccess conditional redirects for multiple domains?Setup secure shared hosting (Apache, PHP, MySQL)LAMP server hosting multiple domains - how to ensure each domain's files and users locked to only that domain?Techniques for securing mod_php for shared hosting (WAMP)?Apache2 give access to specific locations (.htaccess file)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I want to limit access to files using PHP open_basedir for multiple domains. Every domain sits in own directory, so I want prevent all domains PHP scripts from interfering with each other. How can I set different open_basedir
path for every domain in single .htaccess
?
If it would be only 1 domain, it could look like this:
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/example.com/
Every user has FTP
account limited to /hosting/domains/example.com/
.
So, obviously, I can not put .htaccess
into /hosting/domains/example.com/.htaccess
as user would be able to change .htaccess
content. So, there must be single .htaccess
in /hosting/domains/.htaccess
for all domains.
This is how I imagine it, is something like this possible?
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/$current_domain/
I am using: Apache 2.4, PHP 5.5
php .htaccess open-basedir
add a comment |
I want to limit access to files using PHP open_basedir for multiple domains. Every domain sits in own directory, so I want prevent all domains PHP scripts from interfering with each other. How can I set different open_basedir
path for every domain in single .htaccess
?
If it would be only 1 domain, it could look like this:
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/example.com/
Every user has FTP
account limited to /hosting/domains/example.com/
.
So, obviously, I can not put .htaccess
into /hosting/domains/example.com/.htaccess
as user would be able to change .htaccess
content. So, there must be single .htaccess
in /hosting/domains/.htaccess
for all domains.
This is how I imagine it, is something like this possible?
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/$current_domain/
I am using: Apache 2.4, PHP 5.5
php .htaccess open-basedir
May be just add it to virtual host configuration? Why it should be in .htaccess?
– Somescout
Nov 15 '14 at 11:57
I am on shared hosting without access to httpd.conf. Can use .htaccess only.
– Martin
Nov 15 '14 at 15:18
add a comment |
I want to limit access to files using PHP open_basedir for multiple domains. Every domain sits in own directory, so I want prevent all domains PHP scripts from interfering with each other. How can I set different open_basedir
path for every domain in single .htaccess
?
If it would be only 1 domain, it could look like this:
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/example.com/
Every user has FTP
account limited to /hosting/domains/example.com/
.
So, obviously, I can not put .htaccess
into /hosting/domains/example.com/.htaccess
as user would be able to change .htaccess
content. So, there must be single .htaccess
in /hosting/domains/.htaccess
for all domains.
This is how I imagine it, is something like this possible?
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/$current_domain/
I am using: Apache 2.4, PHP 5.5
php .htaccess open-basedir
I want to limit access to files using PHP open_basedir for multiple domains. Every domain sits in own directory, so I want prevent all domains PHP scripts from interfering with each other. How can I set different open_basedir
path for every domain in single .htaccess
?
If it would be only 1 domain, it could look like this:
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/example.com/
Every user has FTP
account limited to /hosting/domains/example.com/
.
So, obviously, I can not put .htaccess
into /hosting/domains/example.com/.htaccess
as user would be able to change .htaccess
content. So, there must be single .htaccess
in /hosting/domains/.htaccess
for all domains.
This is how I imagine it, is something like this possible?
# /hosting/domains/.htaccess
php_value open_basedir /hosting/domains/$current_domain/
I am using: Apache 2.4, PHP 5.5
php .htaccess open-basedir
php .htaccess open-basedir
asked Nov 15 '14 at 11:25
MartinMartin
1065
1065
May be just add it to virtual host configuration? Why it should be in .htaccess?
– Somescout
Nov 15 '14 at 11:57
I am on shared hosting without access to httpd.conf. Can use .htaccess only.
– Martin
Nov 15 '14 at 15:18
add a comment |
May be just add it to virtual host configuration? Why it should be in .htaccess?
– Somescout
Nov 15 '14 at 11:57
I am on shared hosting without access to httpd.conf. Can use .htaccess only.
– Martin
Nov 15 '14 at 15:18
May be just add it to virtual host configuration? Why it should be in .htaccess?
– Somescout
Nov 15 '14 at 11:57
May be just add it to virtual host configuration? Why it should be in .htaccess?
– Somescout
Nov 15 '14 at 11:57
I am on shared hosting without access to httpd.conf. Can use .htaccess only.
– Martin
Nov 15 '14 at 15:18
I am on shared hosting without access to httpd.conf. Can use .htaccess only.
– Martin
Nov 15 '14 at 15:18
add a comment |
2 Answers
2
active
oldest
votes
I think it is not possible. Every domain has to have specific .htaccess
file because this file is settings per folder so there is no way to specify subfolder. And even this is possible then user can use his own .htaccess
file to override settings.
On shared hosting is only one solution. One user account per domain.
add a comment |
You can set open_basedir
into virtualhost, so users won't be able to edit or delete it, within <Directory>
directive.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f644569%2fdifferent-php-value-open-basedir-based-on-domain-name-in-htaccess%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think it is not possible. Every domain has to have specific .htaccess
file because this file is settings per folder so there is no way to specify subfolder. And even this is possible then user can use his own .htaccess
file to override settings.
On shared hosting is only one solution. One user account per domain.
add a comment |
I think it is not possible. Every domain has to have specific .htaccess
file because this file is settings per folder so there is no way to specify subfolder. And even this is possible then user can use his own .htaccess
file to override settings.
On shared hosting is only one solution. One user account per domain.
add a comment |
I think it is not possible. Every domain has to have specific .htaccess
file because this file is settings per folder so there is no way to specify subfolder. And even this is possible then user can use his own .htaccess
file to override settings.
On shared hosting is only one solution. One user account per domain.
I think it is not possible. Every domain has to have specific .htaccess
file because this file is settings per folder so there is no way to specify subfolder. And even this is possible then user can use his own .htaccess
file to override settings.
On shared hosting is only one solution. One user account per domain.
answered Nov 16 '14 at 19:10
TomášTomáš
1042
1042
add a comment |
add a comment |
You can set open_basedir
into virtualhost, so users won't be able to edit or delete it, within <Directory>
directive.
add a comment |
You can set open_basedir
into virtualhost, so users won't be able to edit or delete it, within <Directory>
directive.
add a comment |
You can set open_basedir
into virtualhost, so users won't be able to edit or delete it, within <Directory>
directive.
You can set open_basedir
into virtualhost, so users won't be able to edit or delete it, within <Directory>
directive.
edited Apr 26 '17 at 2:54
answered Apr 26 '17 at 2:49
mapolonemapolone
14
14
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f644569%2fdifferent-php-value-open-basedir-based-on-domain-name-in-htaccess%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
May be just add it to virtual host configuration? Why it should be in .htaccess?
– Somescout
Nov 15 '14 at 11:57
I am on shared hosting without access to httpd.conf. Can use .htaccess only.
– Martin
Nov 15 '14 at 15:18