SID-02361: Entry point / directories
Status: |
Asked |
TWiki version: |
6.0.2 |
Perl version: |
5.016003 (linux) |
Category: |
CategoryInstallation |
Server OS: |
CentOS release 7.3.1611 (Core) |
Last update: |
5 years ago |
I'm trying to untangle this messed up install of TWiki-6.0.2, Sun, 29 Nov 2015, build 2968.
What's the URL I should put in my browser to bring up the main page / startup / root of all goodness page? The server is a VM and doesn't have a DNS entry just yet.
I think part of my problem is that there's an existing web app on 10.194.132.187, which works, and has to STAY working. So maybe my /etc/httpd/conf/httpd.conf is wrong.
Here's some salient parts of httpd.conf
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<skip some>
IncludeOptional conf.d/*.conf
Now then, the
IncludeOption isn't specified using an absolute path, but I suspect it is somehow working, because the
other app on this server is working, and that is specified in /etc/httpd/conf.d/otherapp.conf
Also in /etc/httpd/conf.d we find twiki.conf, and he has directives like
<Directory "/var/www/twiki/bin">
<Directory "/var/www/twiki/pub">
So I would expect maybe
http://10.194.132.187/wiki/pub to work (it doesn't.)
Not sure where to start here.
--
TWiki Guest - 2018-05-15
Discussion and Answer
You seem pretty close if both
!http://10.194.132.187/do/configure
and
http://10.194.132.187/do/view/Main/TomPeters
work.
- Your TWiki entry page should be
http://10.194.132.187/do/view/Main/WebHome
- you can omit /WebHome
and /Main
for brevity. This means that You have a working ScriptAlias
pointing /do
URLs to /var/www/twiki/bin
.
- The "root"
http://10.194.132.187/
will not bring up anything TWiki related unless you explicitly configure your webserver to do so. Your existing web application may live just fine next to TWiki.
The root of the
pub
directory is intentionally forbidden to be viewed directly in a browser, so
http://10.194.132.187/wiki/pub
is expected to give a 403 status code.
What I do not see in your configuration is the mapping from URL-space to directory-space for your
pub
directory. If you expect URLs like
http://10.194.132.187/wiki/pub/Main/...
to deliver images, css, etc then there should be a directive like the following:
Alias /wiki/pub "/var/www/twiki/pub"
Both the URL-path and the directory path must also be provided in TWiki's configuration under the entries
{PubUrlPath}
and
{PubDir}
, respectively.
--
Harald Jörg - 2018-05-16
Yes! Thanks very much Harald,
http://10.194.132.187/do/view/Main/WebHome
works.
The shortened version,
http://10.194.132.187/do/view
also works.
As to adding the
Alias /wiki/pub...
directive, I did so, putting it in the
twiki.conf
file (which is included into the main
httpd.conf
file). It works as expected, delivering an image when I browse to
http://10.194.132.187/wiki/pub/Main/TWikiGuest/twiki-guest.gif
But is that needed for anything?
Paths:
{PubUrlPath} |
/pub |
{PubDir} |
/var/www/twiki/pub |
Look ok?
--
TWiki Guest - 2018-05-16
Almost correct
Your
{PubUrlPath}
should be
/wiki/pub
, or to be precise: The first parameter of Apache's
Alias
directive must match the value of
{PubUrlPath}
and the second parameter must match the value of
{PubDir}
.
This
is needed because static content is delivered directly by Apache, not going through TWiki. So, Apache needs to know where to find the stuff, and TWiki needs to know which links it must create pointing to images and stuff (that's
{PubUrlPath}
) and where it must write its files if you attach something (that's
{PubDir}
).
--
Harald Jörg - 2018-05-16
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.