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;








0















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










share|improve this question






















  • 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

















0















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










share|improve this question






















  • 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













0












0








0








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










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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










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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company