FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-18-2012, 12:44 AM
Alex
 
Default Changing default apache index page

Hi,

I have an fc17 box with a few virtual hosts, all of which have
index.php as their index page. For some reason it continues to go to
the default fedora welcome page, despite there being an index.php in
the document root.

Even with the only reference to DirectoryIndex in httpd.conf being
"DirectoryIndex index.php", and nothing else, it continues to go to
the welcome page. I've tried making index.php first, followed by
index.html, and it doesn't change.

If I wrap the DirectoryIndex around "<Directory />" tags, it works as expected.

What is the proper way to ensure my index.php page is loaded for all
virtual hosts, and the default /var/www/html page?

Searching for this seems to indicate it may be a bug? I can't see how
that could be possible. I otherwise had no success in finding a
solution.

Thanks,
Alex
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 07-18-2012, 05:40 AM
Néstor
 
Default Changing default apache index page

What is your DocumentRoot set to?
Is php set and running?

Also go to the DoumentRoot and if there is a index.html then rename it or move it to
something else like indexx.html see if that displays your php page.



On Tue, Jul 17, 2012 at 5:44 PM, Alex <mysqlstudent@gmail.com> wrote:

Hi,



I have an fc17 box with a few virtual hosts, all of which have

index.php as their index page. For some reason it continues to go to

the default fedora welcome page, despite there being an index.php in

the document root.



Even with the only reference to DirectoryIndex in httpd.conf being

"DirectoryIndex index.php", and nothing else, it continues to go to

the welcome page. I've tried making index.php first, followed by

index.html, and it doesn't change.



If I wrap the DirectoryIndex around "<Directory />" tags, it works as expected.



What is the proper way to ensure my index.php page is loaded for all

virtual hosts, and the default /var/www/html page?



Searching for this seems to indicate it may be a bug? I can't see how

that could be possible. I otherwise had no success in finding a

solution.



Thanks,

Alex

--

users mailing list

users@lists.fedoraproject.org

To unsubscribe or change subscription options:

https://admin.fedoraproject.org/mailman/listinfo/users

Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Have a question? Ask away: http://ask.fedoraproject.org



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 07-18-2012, 11:36 AM
Tim
 
Default Changing default apache index page

On Tue, 2012-07-17 at 20:44 -0400, Alex wrote:
> I have an fc17 box with a few virtual hosts, all of which have
> index.php as their index page. For some reason it continues to go to
> the default fedora welcome page, despite there being an index.php in
> the document root.
>
> Even with the only reference to DirectoryIndex in httpd.conf being
> "DirectoryIndex index.php", and nothing else, it continues to go to
> the welcome page. I've tried making index.php first, followed by
> index.html, and it doesn't change.
>
> If I wrap the DirectoryIndex around "<Directory />" tags, it works as expected.

Without seeing your configuration files, we can't really tell what's
going on. There are settings that can override settings, depending on
the sequence of entry. If you put your modifications into the
configuration at the wrong spot, they mightn't do what you want.

> What is the proper way to ensure my index.php page is loaded for all
> virtual hosts, and the default /var/www/html page?

Check the manual for Apache. If you installed it, and it's configured
that way, you can just append manual to the local web address, to read
the manual through your web browser. e.g. http://localhost/manual And
look at the sample configuration supply, it usually has several
commented examples in it.

You can put options in it based on the file system and/or the URI path.
If you're making everything the same, then doing the file path way may
be a one-setting-for-all (i.e. everything above /var/www to be treated
the same), else you'd do it in the configurations for each virtual host.

In my *old* Apache configuration, I have a line like this in the main
configuration file, outside of any <Directory> or <Location> clauses:

DirectoryIndex index.html index.html.var

It, first looks for an index.html file, then tries an index.html.var
file. If you want multiple options, list your first choice first.

The main configuration file has a commented main server section, has
that option set, in the example configuration file after, not inside,
some <Directory> clauses.

And, inside my customised <VirtualHost _default_:80> clauses, I have
overriding options, like this.

DirectoryIndex homepage default index.html

That'll first look for a homepage (dot something) file, then try a
default (dot anything-or-other) file, then index.html files. Allowing
for the most obvious homepage.html for the document root, the logical
default.html (or default.shtml, et cetera)) pages for sub-sections, then
the usual index.html file (that usually isn't actually an "index").

If you just want one default document for any directory path, then just
put one file name in there.

My configuration file has a separate NameVirtual host section, it begins
like this:

NameVirtualHost *:80

<Directory /var/www/virtuals/>
AllowOverride all
Options Indexes FollowSymLinks MultiViews Includes
</Directory>

<VirtualHost *:80>
ServerName www.lan.example.com
ServerAlias example lan.example.com
UseCanonicalName On
ServerAdmin tim@lan.example.com
DocumentRoot /var/www/virtuals/examplecom
DirectoryIndex homepage.html start.html default.html index.html
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorLog logs/example-error_log
CustomLog logs/example-access_log combined
XBitHack Full
</VirtualHost>

It's customised for my purposes, but it should give you a template to
experiment with. You don't need the half of it, though.

NB: I keep my virtual hosts outside of /var/www/html, so that it's a
lot harder for someone to cross between different virtual hosts, by
accident of malicious design.

--
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 07-18-2012, 11:24 PM
Stephen Wynne
 
Default Changing default apache index page

Please look at conf/httpd.conf for an oblique reference to
conf.d/welcome.conf. You may find a "Include conf.d/*.conf" statement. Break
these out into specific includes for what you need.


On 07/17/2012 08:44 PM, Alex wrote:

Hi,

I have an fc17 box with a few virtual hosts, all of which have
index.php as their index page. For some reason it continues to go to
the default fedora welcome page, despite there being an index.php in
the document root.


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 07:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org