[opensuse] Playing with apache.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to setup a local apache server to serve a mirror of some repos. In httpd.conf.local I have written: <Directory /data/waterhoard/mirrors> Options FollowSymLinks Indexes Includes AllowOverride All IndexOptions FancyIndexing \ ScanHTMLTitles \ NameWidth=* \ FoldersFirst order deny,allow deny from all allow from localhost .valinor 192.168.1.51 192.168.1.52 </Directory> However, browsing to "http://localhost/data/waterhoard/mirrors" produces error 404, Object not found! The directory in the filesystem is indeed correct. However, I have the file /srv/www/htdocs/index.html, which contains: <a href="/ficheros/mirrors" title="Mirrors">[Mirrors]</a> <br> which works, combined with this definition: <Directory /srv/www/htdocs/ficheros> Options FollowSymLinks Indexes Includes AllowOverride All IndexOptions FancyIndexing \ ScanHTMLTitles \ NameWidth=* \ DescriptionWidth=* \ SuppressLastModified \ SuppressSize order deny,allow deny from all allow from localhost .valinor 192.168.1.51 192.168.1.52 </Directory> There is this directory structure: /srv/www/htdocs /ficheros ~mirrors -> /data/waterhoard/mirrors What would be the correct structure so that: "http://localhost/data/waterhoard/mirrors" works, or even better, "http://localhost/mirrors" The later I think should be just an alias, but first I must make the prior http request to work. - -- Cheers Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAleIDP4ACgkQtTMYHG2NR9XpZQCfSLRToDi36SKB2T4UNDCetb+4 iuUAn0b1mEFBLakTm1d8PqzEb1hy9vgq =1vMB -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
Hi,
I'm trying to setup a local apache server to serve a mirror of some repos.
In httpd.conf.local I have written:
<Directory /data/waterhoard/mirrors> Options FollowSymLinks Indexes Includes AllowOverride All
IndexOptions FancyIndexing \ ScanHTMLTitles \ NameWidth=* \ FoldersFirst
order deny,allow deny from all allow from localhost .valinor 192.168.1.51 192.168.1.52
</Directory>
What is your "DocumentRoot" ?
However, browsing to "http://localhost/data/waterhoard/mirrors" produces error 404, Object not found!
The directory in the filesystem is indeed correct.
That URL would look for DocumentRoot/"data/waterhoard/mirrors".
However, I have the file /srv/www/htdocs/index.html, which contains:
<a href="/ficheros/mirrors" title="Mirrors">[Mirrors]</a> <br>
Okay, I assume that means your DocumentRoot is "/srv/www/htdocs". To access /data/waterboard etc, you need to alias it so apache can reach it.
What would be the correct structure so that:
"http://localhost/data/waterhoard/mirrors" works, or even better, "http://localhost/mirrors"
The later I think should be just an alias, but first I must make the prior http request to work.
I think this is what you need: Alias /mirrors /data/waterhoard/mirrors -- Per Jessen, Zürich (14.1°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-15 10:39, Per Jessen wrote:
Carlos E. R. wrote:
Hi,
I'm trying to setup a local apache server to serve a mirror of some repos.
In httpd.conf.local I have written:
What is your "DocumentRoot" ?
/etc/apache2/default-server.conf: DocumentRoot "/srv/www/htdocs"
However, browsing to "http://localhost/data/waterhoard/mirrors" produces error 404, Object not found!
The directory in the filesystem is indeed correct.
That URL would look for DocumentRoot/"data/waterhoard/mirrors".
Ah. I see...
However, I have the file /srv/www/htdocs/index.html, which contains:
<a href="/ficheros/mirrors" title="Mirrors">[Mirrors]</a> <br>
Okay, I assume that means your DocumentRoot is "/srv/www/htdocs". To access /data/waterboard etc, you need to alias it so apache can reach it.
Yes, I thought so.
What would be the correct structure so that:
"http://localhost/data/waterhoard/mirrors" works, or even better, "http://localhost/mirrors"
The later I think should be just an alias, but first I must make the prior http request to work.
I think this is what you need:
Alias /mirrors /data/waterhoard/mirrors
Ah! It works. I was doing it wrong: Alias /data/waterhoard/mirrors /mirrors Thanks! :-) And zypper can use my mirrored repos happily. :-)) -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
participants (2)
-
Carlos E. R.
-
Per Jessen