2 directories listing with different credentials in 1 virtual host conf?Can't access apache by port 80 from externalApache 2.4 virtual host on different port than 80Apache access control not behaving as expectedApache ever match a virtual host with a different ServerNameBasic auth Apache with TomcatApache virtual host directory directive ignored on second virtual hostVirtual host conf file not showing in apache2ctl -D DUMP_VHOSTS but worksVirtual host configuration ommitedSSL Permission Error: Node.js with HTTPS + Let's Encrypt SSL + Apache + Non-Root UserApache won't start with proxy conf
Two field separators (colon and space) in awk
How do I reattach a shelf to the wall when it ripped out of the wall?
Why does Mind Blank stop the Feeblemind spell?
Can an Area of Effect spell cast outside a Prismatic Wall extend inside it?
a sore throat vs a strep throat vs strep throat
How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?
What is the optimal strategy for the Dictionary Game?
Alignment of various blocks in tikz
What's the name of these pliers?
How much cash can I safely carry into the USA and avoid civil forfeiture?
As an international instructor, should I openly talk about my accent?
Converting a sprinkler system's 24V AC outputs to 3.3V DC logic inputs
Is the claim "Employers won't employ people with no 'social media presence'" realistic?
How to pronounce 'c++' in Spanish
A Note on N!
Multiple options vs single option UI
How could Tony Stark make this in Endgame?
"The cow" OR "a cow" OR "cows" in this context
Philosophical question on logistic regression: why isn't the optimal threshold value trained?
How come there are so many candidates for the 2020 Democratic party presidential nomination?
Apply MapThread to all but one variable
How to not starve gigantic beasts
What makes accurate emulation of old systems a difficult task?
How to limit Drive Letters Windows assigns to new removable USB drives
2 directories listing with different credentials in 1 virtual host conf?
Can't access apache by port 80 from externalApache 2.4 virtual host on different port than 80Apache access control not behaving as expectedApache ever match a virtual host with a different ServerNameBasic auth Apache with TomcatApache virtual host directory directive ignored on second virtual hostVirtual host conf file not showing in apache2ctl -D DUMP_VHOSTS but worksVirtual host configuration ommitedSSL Permission Error: Node.js with HTTPS + Let's Encrypt SSL + Apache + Non-Root UserApache won't start with proxy conf
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Is it possible to list 2 different directories, each with their own different username/password in the same documentroot in the same virtual host conf?
Ultimate goal is to browse to: https://myservershostname
and it displays 2 directories, dir1 and dir2, if you click on dir1 you can only get into it if you type the password for user1, and if you click on dir2 you can only get into it if you type the password for user2.
my non-working config:
<VirtualHost *:443>
DocumentRoot "/app/httpd/home/htdocs/"
ServerName myservershostname
<Directory "/app/httpd/home/htdocs/">
Options Indexes FollowSymLinks
</Directory>
<Directory "/app/httpd/home/htdocs/dir1/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user1
</Directory>
<Directory "/app/httpd/home/htdocs/dir2/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user2
</Directory>
</VirtualHost>
Currently when I browse to https://myservershostname it doesn't list anything. Any input or resources to look at would be very appreciated
apache-2.4
add a comment |
Is it possible to list 2 different directories, each with their own different username/password in the same documentroot in the same virtual host conf?
Ultimate goal is to browse to: https://myservershostname
and it displays 2 directories, dir1 and dir2, if you click on dir1 you can only get into it if you type the password for user1, and if you click on dir2 you can only get into it if you type the password for user2.
my non-working config:
<VirtualHost *:443>
DocumentRoot "/app/httpd/home/htdocs/"
ServerName myservershostname
<Directory "/app/httpd/home/htdocs/">
Options Indexes FollowSymLinks
</Directory>
<Directory "/app/httpd/home/htdocs/dir1/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user1
</Directory>
<Directory "/app/httpd/home/htdocs/dir2/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user2
</Directory>
</VirtualHost>
Currently when I browse to https://myservershostname it doesn't list anything. Any input or resources to look at would be very appreciated
apache-2.4
Looks valid to me.
– Zoredache
Apr 19 at 17:16
@Zoredache thank you. I think I am going to try to isolate this in another box, the httpd.conf where this directives are has a lot of other directives that could be interfering.
– Rafael Ruales
Apr 19 at 17:55
ok, I'm sorry, it does work as @Zoredache pointed out. It's failing in my environment because I am attempting to use port 443, but it works as intended in port 80. Port 443 is being used by something else in tomcat so this was actually working all along. Thanks!
– Rafael Ruales
Apr 19 at 18:08
Indexes require mod_autoindex loaded, do you have it? Sidenote: Directory and DocumentRoot do not need to be specified with trailing slashes.
– ezra-s
yesterday
@ezra-s thank you, yes I do have mod_autoindex loaded, and thanks about the trailing slashes, I wasn't actually sure if it was needed!
– Rafael Ruales
14 hours ago
add a comment |
Is it possible to list 2 different directories, each with their own different username/password in the same documentroot in the same virtual host conf?
Ultimate goal is to browse to: https://myservershostname
and it displays 2 directories, dir1 and dir2, if you click on dir1 you can only get into it if you type the password for user1, and if you click on dir2 you can only get into it if you type the password for user2.
my non-working config:
<VirtualHost *:443>
DocumentRoot "/app/httpd/home/htdocs/"
ServerName myservershostname
<Directory "/app/httpd/home/htdocs/">
Options Indexes FollowSymLinks
</Directory>
<Directory "/app/httpd/home/htdocs/dir1/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user1
</Directory>
<Directory "/app/httpd/home/htdocs/dir2/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user2
</Directory>
</VirtualHost>
Currently when I browse to https://myservershostname it doesn't list anything. Any input or resources to look at would be very appreciated
apache-2.4
Is it possible to list 2 different directories, each with their own different username/password in the same documentroot in the same virtual host conf?
Ultimate goal is to browse to: https://myservershostname
and it displays 2 directories, dir1 and dir2, if you click on dir1 you can only get into it if you type the password for user1, and if you click on dir2 you can only get into it if you type the password for user2.
my non-working config:
<VirtualHost *:443>
DocumentRoot "/app/httpd/home/htdocs/"
ServerName myservershostname
<Directory "/app/httpd/home/htdocs/">
Options Indexes FollowSymLinks
</Directory>
<Directory "/app/httpd/home/htdocs/dir1/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user1
</Directory>
<Directory "/app/httpd/home/htdocs/dir2/">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require user user2
</Directory>
</VirtualHost>
Currently when I browse to https://myservershostname it doesn't list anything. Any input or resources to look at would be very appreciated
apache-2.4
apache-2.4
asked Apr 19 at 15:29
Rafael RualesRafael Ruales
11
11
Looks valid to me.
– Zoredache
Apr 19 at 17:16
@Zoredache thank you. I think I am going to try to isolate this in another box, the httpd.conf where this directives are has a lot of other directives that could be interfering.
– Rafael Ruales
Apr 19 at 17:55
ok, I'm sorry, it does work as @Zoredache pointed out. It's failing in my environment because I am attempting to use port 443, but it works as intended in port 80. Port 443 is being used by something else in tomcat so this was actually working all along. Thanks!
– Rafael Ruales
Apr 19 at 18:08
Indexes require mod_autoindex loaded, do you have it? Sidenote: Directory and DocumentRoot do not need to be specified with trailing slashes.
– ezra-s
yesterday
@ezra-s thank you, yes I do have mod_autoindex loaded, and thanks about the trailing slashes, I wasn't actually sure if it was needed!
– Rafael Ruales
14 hours ago
add a comment |
Looks valid to me.
– Zoredache
Apr 19 at 17:16
@Zoredache thank you. I think I am going to try to isolate this in another box, the httpd.conf where this directives are has a lot of other directives that could be interfering.
– Rafael Ruales
Apr 19 at 17:55
ok, I'm sorry, it does work as @Zoredache pointed out. It's failing in my environment because I am attempting to use port 443, but it works as intended in port 80. Port 443 is being used by something else in tomcat so this was actually working all along. Thanks!
– Rafael Ruales
Apr 19 at 18:08
Indexes require mod_autoindex loaded, do you have it? Sidenote: Directory and DocumentRoot do not need to be specified with trailing slashes.
– ezra-s
yesterday
@ezra-s thank you, yes I do have mod_autoindex loaded, and thanks about the trailing slashes, I wasn't actually sure if it was needed!
– Rafael Ruales
14 hours ago
Looks valid to me.
– Zoredache
Apr 19 at 17:16
Looks valid to me.
– Zoredache
Apr 19 at 17:16
@Zoredache thank you. I think I am going to try to isolate this in another box, the httpd.conf where this directives are has a lot of other directives that could be interfering.
– Rafael Ruales
Apr 19 at 17:55
@Zoredache thank you. I think I am going to try to isolate this in another box, the httpd.conf where this directives are has a lot of other directives that could be interfering.
– Rafael Ruales
Apr 19 at 17:55
ok, I'm sorry, it does work as @Zoredache pointed out. It's failing in my environment because I am attempting to use port 443, but it works as intended in port 80. Port 443 is being used by something else in tomcat so this was actually working all along. Thanks!
– Rafael Ruales
Apr 19 at 18:08
ok, I'm sorry, it does work as @Zoredache pointed out. It's failing in my environment because I am attempting to use port 443, but it works as intended in port 80. Port 443 is being used by something else in tomcat so this was actually working all along. Thanks!
– Rafael Ruales
Apr 19 at 18:08
Indexes require mod_autoindex loaded, do you have it? Sidenote: Directory and DocumentRoot do not need to be specified with trailing slashes.
– ezra-s
yesterday
Indexes require mod_autoindex loaded, do you have it? Sidenote: Directory and DocumentRoot do not need to be specified with trailing slashes.
– ezra-s
yesterday
@ezra-s thank you, yes I do have mod_autoindex loaded, and thanks about the trailing slashes, I wasn't actually sure if it was needed!
– Rafael Ruales
14 hours ago
@ezra-s thank you, yes I do have mod_autoindex loaded, and thanks about the trailing slashes, I wasn't actually sure if it was needed!
– Rafael Ruales
14 hours ago
add a comment |
0
active
oldest
votes
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%2f963828%2f2-directories-listing-with-different-credentials-in-1-virtual-host-conf%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f963828%2f2-directories-listing-with-different-credentials-in-1-virtual-host-conf%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
Looks valid to me.
– Zoredache
Apr 19 at 17:16
@Zoredache thank you. I think I am going to try to isolate this in another box, the httpd.conf where this directives are has a lot of other directives that could be interfering.
– Rafael Ruales
Apr 19 at 17:55
ok, I'm sorry, it does work as @Zoredache pointed out. It's failing in my environment because I am attempting to use port 443, but it works as intended in port 80. Port 443 is being used by something else in tomcat so this was actually working all along. Thanks!
– Rafael Ruales
Apr 19 at 18:08
Indexes require mod_autoindex loaded, do you have it? Sidenote: Directory and DocumentRoot do not need to be specified with trailing slashes.
– ezra-s
yesterday
@ezra-s thank you, yes I do have mod_autoindex loaded, and thanks about the trailing slashes, I wasn't actually sure if it was needed!
– Rafael Ruales
14 hours ago