Virtual Host setting on MAMP

110 views
Skip to first unread message

Ozer Erdonmez

unread,
Apr 20, 2016, 8:31:44 AM4/20/16
to SimpleSAMLphp
Hi Everyone,

I am using Mac OS,

I'm trying this 

<VirtualHost *:80>
        ServerName service.example.com
        DocumentRoot /var/www/service.example.com

        SetEnv SIMPLESAMLPHP_CONFIG_DIR "/simplesamlphp/config"

        Alias "/simplesaml" "/simplesaml/www/
</VirtualHost>

But it doesnt work

Do you any idea to work out this issue ?

Thanks in advance

Peter Schober

unread,
Apr 20, 2016, 8:43:00 AM4/20/16
to SimpleSAMLphp
* Ozer Erdonmez <ozerer...@gmail.com> [2016-04-20 14:31]:
> <VirtualHost *:80>
> ServerName service.example.com
> DocumentRoot /var/www/service.example.com
>
> SetEnv SIMPLESAMLPHP_CONFIG_DIR "/simplesamlphp/config"
>
> Alias "/simplesaml" "/simplesaml/www/
> </VirtualHost>
>
> But it doesnt work

Ignoring the fact that "it doesn't work" is not a technical error
report (and that this is not the Apache httpd support forum), you seem
to be missing closing quotes around the file system resource in your
Alias directive.
(Personally I'd get rid of all the quotes which should not be needed
anyway.)
-peter

Ozer Erdonmez

unread,
Apr 20, 2016, 8:46:19 AM4/20/16
to SimpleSAMLphp, peter....@univie.ac.at

20 Nisan 2016 Çarşamba 15:43:00 UTC+3 tarihinde Peter Schober yazdı:
Yes you are right, sorry for this, I update the question 

Ozer Erdonmez

unread,
Apr 20, 2016, 8:49:10 AM4/20/16
to SimpleSAMLphp
This is my virtual host code;

<VirtualHost *:8080>
        ServerName service.example.com
        DocumentRoot /var/www/service.example.com

        SetEnv SIMPLESAMLPHP_CONFIG_DIR "/Applications/MAMP/htdocs/simplesaml/config"

        Alias "/Applications/MAMP/htdocs/simplesaml/" "/Applications/MAMP/htdocs/simplesaml/www/"
</VirtualHost>

This is /simplemaml look like;

And this is the error I am facing;




Thanks in advance

Peter Schober

unread,
Apr 20, 2016, 8:49:24 AM4/20/16
to SimpleSAMLphp
* Ozer Erdonmez <ozerer...@gmail.com> [2016-04-20 14:31]:
> <VirtualHost *:80>
> ServerName service.example.com
> DocumentRoot /var/www/service.example.com
>
> SetEnv SIMPLESAMLPHP_CONFIG_DIR "/simplesamlphp/config"
>
> Alias "/simplesaml" "/simplesaml/www/
> </VirtualHost>

Not sure what the SetEnv directive is supposed to achieve (and what
instructions you're following) but I doubt it will ever do anything
useful: The Alias directive makes your file system resource
/simplesaml/www/ available as HTTP(S) request URI /simplesaml

So no matter what "SIMPLESAMLPHP_CONFIG_DIR" should point to (a file
system resource or a request URI; the name seems to imply a file
system resource) it seems the value you're setting is wrong.

Unless you have some other mess going on, of course, i.e., you have a
/simplesaml directory exist in the filesystem, plus also a sibling
directory names simplesamlphp/. No way for anyone else to know what
you're doing there.
-peter

Peter Schober

unread,
Apr 20, 2016, 8:55:42 AM4/20/16
to SimpleSAMLphp
* Ozer Erdonmez <ozerer...@gmail.com> [2016-04-20 14:49]:
> This is my virtual host code;

That's very different from what you sent before.

> <VirtualHost *:8080>
> ServerName service.example.com
> DocumentRoot /var/www/service.example.com
>
> SetEnv SIMPLESAMLPHP_CONFIG_DIR
> "/Applications/MAMP/htdocs/simplesaml/config"
>
> Alias "/Applications/MAMP/htdocs/simplesaml/"
> "/Applications/MAMP/htdocs/simplesaml/www/"
> </VirtualHost>

The point of the Alias directive is to make a file system source
(here: SimpleSAMLphp's www directory) available as a request URI.
I'm sure the documentation states something more like
Alias simplesaml /Applications/MAMP/htdocs/simplesaml/www/
and only that would make the content of the directory
/Applications/MAMP/htdocs/simplesaml/www/ available on that vhost at
the request URI /simplesaml

> And this is the error I am facing;
>
> <https://lh3.googleusercontent.com/-OXcqRJat3e8/Vxd6oPaxREI/AAAAAAAAMcA/42YoumpSWX4xN7DFqQIimVz7eotvVXj_gCLcB/s1600/Screen%2BShot%2B2016-04-20%2Bat%2B15.45.25.png>
> <https://lh3.googleusercontent.com/-OXcqRJat3e8/Vxd6oPaxREI/AAAAAAAAMcA/42YoumpSWX4xN7DFqQIimVz7eotvVXj_gCLcB/s1600/Screen%2BShot%2B2016-04-20%2Bat%2B15.45.25.png>

Why not type the actual error message here ("requested URL not found",
was that so difficult), instead of sending a picture of how the error
message looks on your screen around the world?

Anyway, the error is what I told you: You did not follow the
documentation (neither the SimpleSAMLphp one, not the Apache httpd
one) and did something else (and completely useless) instead.

So fix your Alias directive and you're ready for the next error.
-peter
Reply all
Reply to author
Forward
0 new messages