You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kent West <we...@acu.edu> on 2018/02/22 22:38:29 UTC

[users@httpd] How to browse to index.php OR index.html on WordPress site?

I have a WordPress site that works. If my
/etc/apache2/sites-enabled/sitename.conf file is set with the
"DirectoryIndex index.php" directive, all is well, and pointing a
web-browser to http://sitename.org loads the sitename's index.php file as
it should.

But I need to temporarily put up a dummy site, consisting of just a very
simply index.html file. That's easy enough; I create the index.html file,
and then change the sitename.conf file to "DirectoryIndex index.html" and
restart Apache2. All is good.

But I still need to manually be able to get to the full-blown .php-based
site. When I web-browse to sitename/index.php, it reroutes to
sitename/index.html. If I change the .conf file to "DirectoryIndex
index.html index.php" and restart Apache2, that doesn't help.

It seems I can serve index.html OR index.php, but not both at the same time
(depending on the URL entered into the web-browser's URL bar).

Bonus points after getting this to work: Adding a button in the
"index.html" file that allows the viewer to "Click here to get to Full
Site" that points to "index.php".

I've been googling all morning and part of last night to figure this out,
with no joy. Thanks for any help you can throw my way!


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Thu, Feb 22, 2018 at 7:40 PM, Eric Covener <co...@gmail.com> wrote:

> On Thu, Feb 22, 2018 at 5:38 PM, Kent West <we...@acu.edu> wrote:
> > I have a WordPress site that works. If my
> > /etc/apache2/sites-enabled/sitename.conf file is set with the
> > "DirectoryIndex index.php" directive, all is well, and pointing a
> > web-browser to http://sitename.org loads the sitename's index.php file
> as it
> > should.
> >
> > But I need to temporarily put up a dummy site, consisting of just a very
> > simply index.html file. That's easy enough; I create the index.html file,
> > and then change the sitename.conf file to "DirectoryIndex index.html" and
> > restart Apache2. All is good.
> >
> > But I still need to manually be able to get to the full-blown .php-based
> > site. When I web-browse to sitename/index.php, it reroutes to
> > sitename/index.html. If I change the .conf file to "DirectoryIndex
> > index.html index.php" and restart Apache2, that doesn't help.
> >
> > It seems I can serve index.html OR index.php, but not both at the same
> time
> > (depending on the URL entered into the web-browser's URL bar).
> >
> > Bonus points after getting this to work: Adding a button in the
> "index.html"
> > file that allows the viewer to "Click here to get to Full Site" that
> points
> > to "index.php".
> >
> > I've been googling all morning and part of last night to figure this out,
> > with no joy. Thanks for any help you can throw my way!
>
> one idea:
>
> <virtualhost *:80>
> ...
> DirectoryIndex index.html index.php
> </virtualhost>
>
> # Access via an ssh tunnel.
> <virtualhost  127.0.0.1:80>
> ...
> DirectoryIndex index.php
> </virtualhost>
>


I'm not understanding how to make this work. I added:

<virtualhost  127.0.0.1:80>
DirectoryIndex index.php
</virtualhost>

to the bottom of my sitename.conf file, and successfully restarted Apache2,
but I can't figure out what to do from there.


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Eric Covener <co...@gmail.com>.
On Thu, Feb 22, 2018 at 5:38 PM, Kent West <we...@acu.edu> wrote:
> I have a WordPress site that works. If my
> /etc/apache2/sites-enabled/sitename.conf file is set with the
> "DirectoryIndex index.php" directive, all is well, and pointing a
> web-browser to http://sitename.org loads the sitename's index.php file as it
> should.
>
> But I need to temporarily put up a dummy site, consisting of just a very
> simply index.html file. That's easy enough; I create the index.html file,
> and then change the sitename.conf file to "DirectoryIndex index.html" and
> restart Apache2. All is good.
>
> But I still need to manually be able to get to the full-blown .php-based
> site. When I web-browse to sitename/index.php, it reroutes to
> sitename/index.html. If I change the .conf file to "DirectoryIndex
> index.html index.php" and restart Apache2, that doesn't help.
>
> It seems I can serve index.html OR index.php, but not both at the same time
> (depending on the URL entered into the web-browser's URL bar).
>
> Bonus points after getting this to work: Adding a button in the "index.html"
> file that allows the viewer to "Click here to get to Full Site" that points
> to "index.php".
>
> I've been googling all morning and part of last night to figure this out,
> with no joy. Thanks for any help you can throw my way!

one idea:

<virtualhost *:80>
...
DirectoryIndex index.html index.php
</virtualhost>

# Access via an ssh tunnel.
<virtualhost  127.0.0.1:80>
...
DirectoryIndex index.php
</virtualhost>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by "@lbutlr" <kr...@kreme.com>.
On 2018-02-24 (16:33 MST), Kent West <we...@acu.edu> wrote:
> 
> On Sat, Feb 24, 2018 at 4:27 PM, @lbutlr <kr...@kreme.com> wrote:
>> On 2018-02-24 (08:32 MST), Kent West <we...@acu.edu> wrote:
>> 
>>>  And yet, no one's been able to tell me how to do it.
> 
>> We have. Eliminate the rewrites/redirects.
> 
> So is that what I did?

Not as far as I can see, no.

move the .htaccess file out of your web root, or rename it. See if the behavior persists.

> That works for someone who knows what a beer keg is and how to disconnect it from the water line.

The beer keg is Wordpress, which you installed.

-- 
'Tell me, Sir Samuel, do you know the phrase "Quis custodiet ipsos
custodes?"? (...) It means "Who guards the guards themselves?" (...) Who
watches the Watch?' --Feet of Clay


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Sat, Feb 24, 2018 at 4:27 PM, @lbutlr <kr...@kreme.com> wrote:

> On 2018-02-24 (08:32 MST), Kent West <we...@acu.edu> wrote:
> >
> > And yet, no one's been able to tell me how to do it.
>
> We have. Eliminate the rewrites/redirects.
>

So is that what I did?


>
> The fact is that what you want to do is the DEFAULT behavior of apache. It
> will serve the file you ask for UNLESS something else tells it not to.
>
>
Must be something Debian changed then, 'cause I don't even know how to
create or eliminate a rewrite/redirect (unless, that is, that's what I've
done.)



> Basically, you are asking "How do i get water to come out of a faucet
> instead of beer" and we're saying "unhook the beer keg from your water
> line" and you're saying "that doesn't tell me how to get water out of my
> faucet".
>

That works for someone who knows what a beer keg is and how to disconnect
it from the water line.

At any rate, it works now. Thanks!

>
>
> --
> Lisa Bonet ate no Basil
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

[users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by "@lbutlr" <kr...@kreme.com>.
On 2018-02-24 (08:32 MST), Kent West <we...@acu.edu> wrote:
> 
> And yet, no one's been able to tell me how to do it. 

We have. Eliminate the rewrites/redirects.

The fact is that what you want to do is the DEFAULT behavior of apache. It will serve the file you ask for UNLESS something else tells it not to.

Basically, you are asking "How do i get water to come out of a faucet instead of beer" and we're saying "unhook the beer keg from your water line" and you're saying "that doesn't tell me how to get water out of my faucet".


-- 
Lisa Bonet ate no Basil


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by mlrx <ml...@18informatique.com>.
Le 24/02/2018 à 16:32, Kent West a écrit :
> Well, instead of becoming more of an expert than the experts I asked, I had
> hoped the experts I asked could tell me how to do it.
Do you prefer receive fish or learn how to fish ? ;-)
Become a expert is not necessary, but you "must" do better cause you
are a part of world Internet chain.
"The resistance of a chain is worth the resistance of the weakest of
its link"
In ancient times or in more hostile countries, someone would be
responsible for answering to you "RTFM"…
Those to whom you will ask for help may sometimes answer, give you
research tips or advice but the vast majority of the time, nobody will
do for you because we can not know for you what is good for you.
No interference.


> I understand that setting up/monitoring a server is not a birth gift, and I
> hope I haven't left that impression. If so, I apologize. On the other hand,
> does running a mom&pop web-site require a full-time professional career
> commitment?
It is a real job but non-professional can do it.
It's a big work to learn it by own-self.
My apologies, I correct: It's a big work.


>> cp /etc/wordpress/config-sitename.org /etc/wordpress/
>>> config-beta.sitename.orgIs it the real address in your system tree ?
>>>
>>[…]
>>
> This is the way Debian does it; as I understand it, this file *is* a conf
> file, and not a public file.
> 
> No, "sitename" is not the real address.
Maybe I don't understand but don't you have an address like those :
/etc/httpd/sites-available
/etc/apache2/sites-available
/etc/apache2/vhosts.d/

The file "wp.conf" goes to /etc/apache2/[the good rep] but
WP's files need to go in /srv/www (depending your version and OS)
I never seen "/etc/wordpress/".
Wich versionS do you use ?


>> Modify your WP conf here -> https://domain.tld/wp-admin/op
>> tions-general.php
>>    { WordPress Address (URL), Site Address (URL) }¹
>> Beside of it, it can need 24-48h to complete DNS propagation around
>> the world.
>>
> […]
> 
> Now I can browse to index.html, and then click on the link to go to the
> beta site.
> 
> Thanks to you, and to all who responded!

You're welcome :-)

Best regards,
-- 
benoist

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Sat, Feb 24, 2018 at 2:22 AM, mlrx <ml...@18informatique.com> wrote:

> Le 23/02/2018 à 22:12, Kent West a écrit :
>
>> On Thu, Feb 22, 2018 at 4:38 PM, Kent West <we...@acu.edu> wrote:
>>
>> It seems I can serve index.html OR index.php, but not both at the same
>>> time (depending on the URL entered into the web-browser's URL bar).
>>>
>>
>> Surely I'm not the only person to ever want to do this? Surely this is not
>> that difficult of a task?
>>
>
> It is not.


And yet, no one's been able to tell me how to do it. Nor does Google seem
to have the answer (although the flaw may be in my google-fu, not in the
actual lack of an answer).


> Just need to learn more: set-up and monitor a server is not
> a birth gift but it's possible by yourself (see below).
>
>
Well, instead of becoming more of an expert than the experts I asked, I had
hoped the experts I asked could tell me how to do it.

I understand that setting up/monitoring a server is not a birth gift, and I
hope I haven't left that impression. If so, I apologize. On the other hand,
does running a mom&pop web-site require a full-time professional career
commitment?


> cp /etc/wordpress/config-sitename.org /etc/wordpress/
>> config-beta.sitename.orgIs it the real address in your system tree ?
>>
>
> Depending your system, those public files should be
> in /var/www/ or /srv/www or something like this.
> /etc/ is reserved to all conf files.
>


This is the way Debian does it; as I understand it, this file *is* a conf
file, and not a public file.

No, "sitename" is not the real address.



> But when I go any deeper than the front page, it redirects back to
>> index.html, just like it did when I did the much simpler "index1.php"
>> method earlier. Bummer.
>>
>
> Commenting all rewrite rules is a good test, but it's probably better
> to try this 1st:
> Modify your WP conf here -> https://domain.tld/wp-admin/op
> tions-general.php
>   { WordPress Address (URL), Site Address (URL) }¹
> Beside of it, it can need 24-48h to complete DNS propagation around
> the world.
>

Ha! You're a genius! You're the expert with the answer!

To sum up:

I changed my DNS settings with my domain registrar to include "beta." at
the front of my domain name, so that I can browse to either sitename.org or
beta.sitename.org.

I made a couple of config changes to the /etc/wordpress and
/etc/apache2/sites-* dirs (documented earlier in this thread).

I went to sitename.org/wp-admin/options-general.php and added "beta." to
the Wordpress URL and the site URL fields.

I added a link to index.html pointing to beta.sitename.org/index.php.

Now I can browse to index.html, and then click on the link to go to the
beta site.

Thanks to you, and to all who responded!


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by mlrx <ml...@18informatique.com>.
Le 23/02/2018 à 22:12, Kent West a écrit :
> On Thu, Feb 22, 2018 at 4:38 PM, Kent West <we...@acu.edu> wrote:
> 
>> It seems I can serve index.html OR index.php, but not both at the same
>> time (depending on the URL entered into the web-browser's URL bar).
> 
> Surely I'm not the only person to ever want to do this? Surely this is not
> that difficult of a task?

It is not. Just need to learn more: set-up and monitor a server is not
a birth gift but it's possible by yourself (see below).


> cp /etc/wordpress/config-sitename.org /etc/wordpress/
> config-beta.sitename.orgIs it the real address in your system tree ?

Depending your system, those public files should be
in /var/www/ or /srv/www or something like this.
/etc/ is reserved to all conf files.


> But when I go any deeper than the front page, it redirects back to
> index.html, just like it did when I did the much simpler "index1.php"
> method earlier. Bummer.

Commenting all rewrite rules is a good test, but it's probably better
to try this 1st:
Modify your WP conf here -> 
https://domain.tld/wp-admin/options-general.php
   { WordPress Address (URL), Site Address (URL) }¹
Beside of it, it can need 24-48h to complete DNS propagation around
the world.

It should be useful to read the documentation for your OS and
additional software that you could use like Apache².
About security, minimum is to known how to make a good configuration
with iptables, ssh³, fail2ban⁴, how to monitor your server and of
course, harden an operating system⁵.

WP is one of the most "attacked" CMS. It can be a good practice to add
additional access control on the admin part (why not starting with
mod_auth_basic⁶?). It's also probably good to learn and use a tool
like "Jetpack"⁷.

¹ https://codex.wordpress.org/Settings_General_Screen
² and secure it. With ssl directives but also others
   https://httpd.apache.org/docs/2.4/en/
   https://httpd.apache.org/docs/2.4/en/mod/quickreference.html
³ https://www.ssi.gouv.fr/uploads/2015/09/NT_OpenSSH_en.pdf
   (a little bit out-dated but a very good start)
⁴ https://www.fail2ban.org/wiki/index.php/MANUAL_0_8
⁵ example for CentOS7 https://highon.coffee/blog/security-harden-centos-7/
⁶ https://httpd.apache.org/docs/current/en/howto/auth.html
 
https://httpd.apache.org/docs/current/en/mod/mod_authn_core.html#authtype
⁷ https://wordpress.org/plugins/jetpack/

humble regards,
-- 
benoist

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Thu, Feb 22, 2018 at 4:38 PM, Kent West <we...@acu.edu> wrote:

> It seems I can serve index.html OR index.php, but not both at the same
> time (depending on the URL entered into the web-browser's URL bar).
>

Surely I'm not the only person to ever want to do this? Surely this is not
that difficult of a task?

-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Thu, Feb 22, 2018 at 11:14 PM, @lbutlr <kr...@kreme.com> wrote:

> On 22 Feb 2018, at 20:52, Kent West <we...@acu.edu> wrote:
> > On Thu, Feb 22, 2018 at 7:32 PM, @lbutlr <kr...@kreme.com> wrote:
> >
> > If I'm understanding you, this is not what I want; both index.html and
> index.php exist. I just need a means of picking either via URL.
>
> Which I am able to do. In fact, something has to specifically tell apache
> to NOT load a file that is specified by a full path. DirectoryInde only
> affects what loads the you laid a path ending in /
>

Okay, I added those three lines to my
/etc/apache2/sites-enabled/sitename.conf file:

 .
 .
 .
                DirectoryIndex index.html
#              DirectoryIndex index.php
                AllowOverride None
                Require all granted
        </Directory>

        <IfModule dir_module>
            DirectoryIndex index.php index.html
        </IfModule>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
 .
 .
 .

and restarted Apache2.

Now when I browse to sitename.org, I get the index.html file, and when I
browse to sitename.org/index.php, I still get the index.html file. So
nothing has changed.

I'm still doing something wrong?



> >> Wordpress has a pretty complicated .htaccess file, did you check there?
> >
> > No; it's my understanding that anything I can do in an .htaccess file I
> can do in the main global config files, that they're mostly just for
> overrides to those global config files, so I've just focused on the main
> global config files.
>
> The global config files will not override index.html to index.php, but the
> .htaccess might.
>
> Googling for a wordpress .htaccess I see the default config contains MANY
> rewriting conditions.
>
> <IfModule mod_rewrite.c>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{HTTP_HOST} !^webdav
> RewriteRule . /index.php [L]
> </IfModule>
>
>
I'd be happy to go the .htaccess route, but at this point, I don't have a
clue as to where to begin with this information you've provided. I think
you've only demonstrated that .htaccess has complexity, not that you've
demonstrated the specific complexity I'm needing to reach my goal?

Thanks!


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

[users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by "@lbutlr" <kr...@kreme.com>.
On 22 Feb 2018, at 20:52, Kent West <we...@acu.edu> wrote:
> On Thu, Feb 22, 2018 at 7:32 PM, @lbutlr <kr...@kreme.com> wrote:
> 
> If I'm understanding you, this is not what I want; both index.html and index.php exist. I just need a means of picking either via URL.

Which I am able to do. In fact, something has to specifically tell apache to NOT load a file that is specified by a full path. DirectoryInde only affects what loads the you laid a path ending in /

>> Wordpress has a pretty complicated .htaccess file, did you check there?
> 
> No; it's my understanding that anything I can do in an .htaccess file I can do in the main global config files, that they're mostly just for overrides to those global config files, so I've just focused on the main global config files.

The global config files will not override index.html to index.php, but the .htaccess might.

Googling for a wordpress .htaccess I see the default config contains MANY rewriting conditions.

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^webdav
RewriteRule . /index.php [L]
</IfModule>


-- 
Today the road all runners come/Shoulder high we bring you home. And
set you at your threshold down/Townsman of a stiller town.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Thu, Feb 22, 2018 at 7:32 PM, @lbutlr <kr...@kreme.com> wrote:

> On 2018-02-22 (15:38 MST), Kent West <we...@acu.edu> wrote:
> >
> > But I still need to manually be able to get to the full-blown .php-based
> site. When I web-browse to sitename/index.php, it reroutes to
> sitename/index.html. If I change the .conf file to "DirectoryIndex
> index.html index.php" and restart Apache2, that doesn't help.
>
>
> I have, in http.conf:
>
> <IfModule dir_module>
>     DirectoryIndex index.php index.html
> </IfModule>
>
> Which loads index.php by default if it's present, otherwise index.html
>

If I'm understanding you, this is not what I want; both index.html and
index.php exist. I just need a means of picking either via URL.


>
> Neither 'redirects' to the other.
>
> I've never used a site.conf in this way, but I have overridden the default
> in a site conf:
>
> DirectoryIndex index.htm
>
> for example.
>
> Wordpress has a pretty complicated .htaccess file, did you check there?
>


No; it's my understanding that anything I can do in an .htaccess file I can
do in the main global config files, that they're mostly just for overrides
to those global config files, so I've just focused on the main global
config files.

But if .htaccess will solve my problem, I'm happy to go that route.

Thanks, though!

-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

[users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by "@lbutlr" <kr...@kreme.com>.
On 2018-02-22 (15:38 MST), Kent West <we...@acu.edu> wrote:
> 
> But I still need to manually be able to get to the full-blown .php-based site. When I web-browse to sitename/index.php, it reroutes to sitename/index.html. If I change the .conf file to "DirectoryIndex index.html index.php" and restart Apache2, that doesn't help.


I have, in http.conf:

<IfModule dir_module>
    DirectoryIndex index.php index.html 
</IfModule>

Which loads index.php by default if it's present, otherwise index.html

Neither 'redirects' to the other.

I've never used a site.conf in this way, but I have overridden the default in a site conf:

DirectoryIndex index.htm

for example.

Wordpress has a pretty complicated .htaccess file, did you check there?

-- 
"I've just learned about his illness. Let's hope it's nothing trivial."
Irvin S. Cobb


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: How to browse to index.php OR index.html on WordPress site?

Posted by "@lbutlr" <kr...@kreme.com>.
On 2018-02-23 (07:24 MST), Kent West <we...@acu.edu> wrote:
> 
> I apologize for being uneducated about Apache2, but I'm not quite up on "vhost". Are your lines above something I should put verbatim into my /etc/apache2/sites-enabled/sitename.conf file, or am I supposed to tailor them to my specific settings, and if so, I really have no idea how to go about doing that.


I don't use Wordpress, but wordpress rewrites URLs via commands it puts in .htaccess. I suspect if you comment those lines, what you are doing will sort of work (you'll be able to load the index file you want) but wordpress will break.

I'd start by commenting the whole thing out to test, (or moving it aside)

But as I said, wordpress itself will likely break.

The issue here is not Apache per se, it is the way that wordpress works. Loading a different index is something it is specifically designed to prevent. This is a good idea for the vast majority of WordPress users; and I mean like 99.999% of them.

Also check for Rewrite conditions in http.conf and the <Virtualhost ...> => <Directory ...> portion of the domain conf.

-- 
C-3PO: We seem to be made to suffer. It's our lot in life.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by TG Servers <sr...@prvtmail.net>.

Am 23. Februar 2018 9:34:23 nachm. schrieb Kent West <we...@acu.edu>:

> On Fri, Feb 23, 2018 at 9:26 AM, mlrx <ml...@18informatique.com> wrote:
>
>> Le 23/02/2018 à 15:24, Kent West a écrit :
>>
>>> On Fri, Feb 23, 2018 at 1:18 AM, mlrx <ml...@18informatique.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> is the simplest way be something like this (?) :
>>>>
>>>> vhost1 : actual WP conf
>>>> vhost2 : DocumentRoot = WP directory
>>>>           DirectoryIndex index.html
>>>>
>>>> In index.html, the button links to vhost1/index.php.
>>>>
>>>>
>>>>
>>> I apologize for being uneducated about Apache2, but I'm not quite up on
>>> "vhost". Are your lines above something I should put verbatim into my
>>> /etc/apache2/sites-enabled/sitename.conf file, or am I supposed to tailor
>>> them to my specific settings, and if so, I really have no idea how to go
>>> about doing that.
>>>
>>> Thanks!
>>>
>>
>> Hello,
>>
>> vhost = virtual host = 1 web site (short way)
>> You need one file per vhost in sites-available/
>>
>> Wath I suggest is to configure -for ex.- :
>> - vhostA with domain.tld
>>     DirectoryIndex index.html
>> - vhostB with sub.domain.tld (actual WP)
>>     DirectoryIndex index.php
>>
>
> So I did:
>
> cp /etc/apache2/sites-available/sitename.org /etc/apache2/sites-available/
> beta.sitename.org
>
> Then edited the beta.sitename.org, changing the "DirectoryIndex index.html"
> to "DirectoryIndex index.php", and changing "ServerName sitename.org" to
> "ServerName beta.sitename.org".
>
> Then I created the symlink ("a2ensite beta.sitename.org").
>
> Then I restarted Apache2 ("systemctl restart apache2").
>
> Now when I web-browse to "sitename.org" I get the .html file as expected,
> but when I browse to "beta.sitename.org" I get "Hmm. We're having trouble
> finding that site."
>
>

Did you make a DNS entry for beta.sitename.org in your DNS zone file??

Tom

>
>> I would like to point a detail:
>> This directive
>>     DirectoryIndex index.php index.html
>> mean
>>     serve index.php 1st if exists else serve index.html 1st
>>
>> Am I better for understanding?
>>
>>
>>
> I think I already understood this, but since I have both files, it only
> serves up the first one, every time, which is not what I want.
>
>
> Thanks!
>
>
>
>> Regards,
>>
>> --
>> benoist
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by TG Servers <sr...@prvtmail.net>.

Am 23. Februar 2018 10:08:34 nachm. schrieb Kent West <we...@acu.edu>:

> On Fri, Feb 23, 2018 at 2:55 PM, TG Servers <sr...@prvtmail.net> wrote:
>
>> Am 23. Februar 2018 9:34:23 nachm. schrieb Kent West <we...@acu.edu>:
>>
>> > On Fri, Feb 23, 2018 at 9:26 AM, mlrx <ml...@18informatique.com> wrote:
>> >
>> >> Le 23/02/2018 à 15:24, Kent West a écrit :
>> >>
>> >>> On Fri, Feb 23, 2018 at 1:18 AM, mlrx <ml...@18informatique.com> wrote:
>> >>>
>> >>>> Hello,
>> >>>>
>> >>>> is the simplest way be something like this (?) :
>> >>>>
>> >>>> vhost1 : actual WP conf
>> >>>> vhost2 : DocumentRoot = WP directory
>> >>>>           DirectoryIndex index.html
>> >>>>
>> >>>> In index.html, the button links to vhost1/index.php.
>> >>>>
>> >>>>
>> >>>>
>> >>> I apologize for being uneducated about Apache2, but I'm not quite up on
>> >>> "vhost". Are your lines above something I should put verbatim into my
>> >>> /etc/apache2/sites-enabled/sitename.conf file, or am I supposed to
>> tailor
>> >>> them to my specific settings, and if so, I really have no idea how to
>> go
>> >>> about doing that.
>> >>>
>> >>> Thanks!
>> >>>
>> >>
>> >> Hello,
>> >>
>> >> vhost = virtual host = 1 web site (short way)
>> >> You need one file per vhost in sites-available/
>> >>
>> >> Wath I suggest is to configure -for ex.- :
>> >> - vhostA with domain.tld
>> >>     DirectoryIndex index.html
>> >> - vhostB with sub.domain.tld (actual WP)
>> >>     DirectoryIndex index.php
>> >>
>> >
>> > So I did:
>> >
>> > cp /etc/apache2/sites-available/sitename.org
>> /etc/apache2/sites-available/
>> > beta.sitename.org
>> >
>> > Then edited the beta.sitename.org, changing the "DirectoryIndex
>> index.html"
>> > to "DirectoryIndex index.php", and changing "ServerName sitename.org" to
>> > "ServerName beta.sitename.org".
>> >
>> > Then I created the symlink ("a2ensite beta.sitename.org").
>> >
>> > Then I restarted Apache2 ("systemctl restart apache2").
>> >
>> > Now when I web-browse to "sitename.org" I get the .html file as
>> expected,
>> > but when I browse to "beta.sitename.org" I get "Hmm. We're having
>> trouble
>> > finding that site."
>> >
>> >
>>
>> Did you make a DNS entry for beta.sitename.org in your DNS zone file??
>>
>> Tom
>>
>>
>>
> Oh-h-h... You think I have access to make DNS changes.
>
> No. Looks like this route is a no-go then?
>
>

I am afraid you cannot do that then. If you have no DNS entry for 
beta.sitename.org no browser no nothing knows how to resolve this... it's a 
subdomain... did not read everything but you can edit apache conf and 
cannot edit DNS entries??

>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Fri, Feb 23, 2018 at 3:26 PM, David Copeland <da...@jsidata.ca>
wrote:

> But the DNS entries for "sitename.org" are maintained somewhere, by
> somebody, just ask them to add the subdomain.
>
>
Ah, yes, I was still fundamentally misunderstanding what I was supposed to
be doing.

So, I went to "google.domains.com" and logged in to tinker with my domain
settings, and now I've added a "Registered host", just by adding the
"beta." to the front of my sitename - same address.

But I'm guessing that's not enough, because I'm still getting a "not found"
error.



>
> On 23/02/18 04:18 PM, Kent West wrote:
>
>
>
> On Fri, Feb 23, 2018 at 3:13 PM, TG Servers <sr...@prvtmail.net> wrote:
>
>> I am afraid you cannot do that then. If you have no DNS entry for
>> beta.sitename.org no browser no nothing knows how to resolve this...
>> it's a subdomain... did not read everything but you can edit apache conf
>> and cannot edit DNS entries??
>>
>>
>>
> Well, I can on the box (/etc/hosts), but not on the network, at least not
> without buying another domain name? But changing it on the box's /etc/hosts
> file won't help when I'm browsing in from Topeka or Kalamazoo.
>
> Unless I'm still fundamentally misunderstanding what I'm supposed to be
> doing?
>
>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com
>
>
>
> --
> David Copeland
> JSI Data Systems Limited613-727-9353 <(613)%20727-9353>www.jsidata.ca
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by David Copeland <da...@jsidata.ca>.
But the DNS entries for "sitename.org" are maintained somewhere, by
somebody, just ask them to add the subdomain.

On 23/02/18 04:18 PM, Kent West wrote:
>
>
> On Fri, Feb 23, 2018 at 3:13 PM, TG Servers <srvrs@prvtmail.net
> <ma...@prvtmail.net>> wrote:
>
>     I am afraid you cannot do that then. If you have no DNS entry for
>     beta.sitename.org <http://beta.sitename.org>no browser no nothing
>     knows how to resolve this... it's a subdomain... did not read
>     everything but you can edit apache conf and cannot edit DNS entries??
>
>
>
> Well, I can on the box (/etc/hosts), but not on the network, at least
> not without buying another domain name? But changing it on the box's
> /etc/hosts file won't help when I'm browsing in from Topeka or Kalamazoo.
>
> Unless I'm still fundamentally misunderstanding what I'm supposed to
> be doing?
>
>
> -- 
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com


-- 
David Copeland
JSI Data Systems Limited
613-727-9353
www.jsidata.ca


Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by TG Servers <sr...@prvtmail.net>.

Am 23. Februar 2018 10:19:29 nachm. schrieb Kent West <we...@acu.edu>:

> On Fri, Feb 23, 2018 at 3:13 PM, TG Servers <sr...@prvtmail.net> wrote:
>
>> I am afraid you cannot do that then. If you have no DNS entry for
>> beta.sitename.org no browser no nothing knows how to resolve this... it's
>> a subdomain... did not read everything but you can edit apache conf and
>> cannot edit DNS entries??
>>
>>
>>
> Well, I can on the box (/etc/hosts), but not on the network, at least not
> without buying another domain name? But changing it on the box's /etc/hosts
> file won't help when I'm browsing in from Topeka or Kalamazoo.
>
> Unless I'm still fundamentally misunderstanding what I'm supposed to be
> doing?
>

If you own sitename.org already beta.sitename.org is only a subdomain. No 
need to buy another domain. If you want a completely different domain 
(change sitename.org to something completely different) you would have to 
of course.
In your DNS zone you just need to make an entry for beta.sitename.org which 
points to the ip of the server. As just written in the meantime... somebody 
has to take care of DNS handling

>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
Almost got it.

After making those changes, I made one more change:

cp /etc/wordpress/config-sitename.org /etc/wordpress/
config-beta.sitename.org
chown www-data:www-date /etc/wordpress/config-beta.sitename.org


But when I go any deeper than the front page, it redirects back to
index.html, just like it did when I did the much simpler "index1.php"
method earlier. Bummer.


On Fri, Feb 23, 2018 at 3:41 PM, Kent West <we...@acu.edu> wrote:

>
>
> On Fri, Feb 23, 2018 at 3:29 PM, TG Servers <sr...@prvtmail.net> wrote:
>
>> Am 23. Februar 2018 10:19:29 nachm. schrieb Kent West <we...@acu.edu>:
>>
>> > On Fri, Feb 23, 2018 at 3:13 PM, TG Servers <sr...@prvtmail.net> wrote:
>> >
>> >> I am afraid you cannot do that then. If you have no DNS entry for
>> >> beta.sitename.org no browser no nothing knows how to resolve this..
>> it's
>> >> a subdomain... did not read everything but you can edit apache conf and
>> >> cannot edit DNS entries??
>> >>
>> >>
>> >>
>> > Well, I can on the box (/etc/hosts), but not on the network, at least
>> not
>> > without buying another domain name? But changing it on the box's
>> /etc/hosts
>> > file won't help when I'm browsing in from Topeka or Kalamazoo.
>> >
>> > Unless I'm still fundamentally misunderstanding what I'm supposed to be
>> > doing?
>> >
>>
>> If you own sitename.org already beta.sitename.org is only a subdomain.
>> No need to buy another domain. If you want a completely different domain
>> (change sitename.org to something completely different) you would have
>> to of course.
>> In your DNS zone you just need to make an entry for beta.sitename.org
>> which points to the ip of the server. As just written in the meantime...
>> somebody has to take care of DNS handling
>>
>>
>>
> Ah, so yes, I was still fundamentally misunderstanding what I'm supposed
> to do.
>
> So I've gone to domains.google.com to tinker with my domain name; I've
> added a "Registered host", just be adding a line with the "beta." added to
> the front of the address, and I've added a "Custom resource record", by
> adding a "beta" line.
>
> But I'm still getting a "cannot find" error on the beta site.
>
>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com
>



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Fri, Feb 23, 2018 at 3:29 PM, TG Servers <sr...@prvtmail.net> wrote:

> Am 23. Februar 2018 10:19:29 nachm. schrieb Kent West <we...@acu.edu>:
>
> > On Fri, Feb 23, 2018 at 3:13 PM, TG Servers <sr...@prvtmail.net> wrote:
> >
> >> I am afraid you cannot do that then. If you have no DNS entry for
> >> beta.sitename.org no browser no nothing knows how to resolve this..
> it's
> >> a subdomain... did not read everything but you can edit apache conf and
> >> cannot edit DNS entries??
> >>
> >>
> >>
> > Well, I can on the box (/etc/hosts), but not on the network, at least not
> > without buying another domain name? But changing it on the box's
> /etc/hosts
> > file won't help when I'm browsing in from Topeka or Kalamazoo.
> >
> > Unless I'm still fundamentally misunderstanding what I'm supposed to be
> > doing?
> >
>
> If you own sitename.org already beta.sitename.org is only a subdomain. No
> need to buy another domain. If you want a completely different domain
> (change sitename.org to something completely different) you would have to
> of course.
> In your DNS zone you just need to make an entry for beta.sitename.org
> which points to the ip of the server. As just written in the meantime...
> somebody has to take care of DNS handling
>
>
>
Ah, so yes, I was still fundamentally misunderstanding what I'm supposed to
do.

So I've gone to domains.google.com to tinker with my domain name; I've
added a "Registered host", just be adding a line with the "beta." added to
the front of the address, and I've added a "Custom resource record", by
adding a "beta" line.

But I'm still getting a "cannot find" error on the beta site.


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Fri, Feb 23, 2018 at 3:13 PM, TG Servers <sr...@prvtmail.net> wrote:

> I am afraid you cannot do that then. If you have no DNS entry for
> beta.sitename.org no browser no nothing knows how to resolve this... it's
> a subdomain... did not read everything but you can edit apache conf and
> cannot edit DNS entries??
>
>
>
Well, I can on the box (/etc/hosts), but not on the network, at least not
without buying another domain name? But changing it on the box's /etc/hosts
file won't help when I'm browsing in from Topeka or Kalamazoo.

Unless I'm still fundamentally misunderstanding what I'm supposed to be
doing?


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Fri, Feb 23, 2018 at 2:55 PM, TG Servers <sr...@prvtmail.net> wrote:

> Am 23. Februar 2018 9:34:23 nachm. schrieb Kent West <we...@acu.edu>:
>
> > On Fri, Feb 23, 2018 at 9:26 AM, mlrx <ml...@18informatique.com> wrote:
> >
> >> Le 23/02/2018 à 15:24, Kent West a écrit :
> >>
> >>> On Fri, Feb 23, 2018 at 1:18 AM, mlrx <ml...@18informatique.com> wrote:
> >>>
> >>>> Hello,
> >>>>
> >>>> is the simplest way be something like this (?) :
> >>>>
> >>>> vhost1 : actual WP conf
> >>>> vhost2 : DocumentRoot = WP directory
> >>>>           DirectoryIndex index.html
> >>>>
> >>>> In index.html, the button links to vhost1/index.php.
> >>>>
> >>>>
> >>>>
> >>> I apologize for being uneducated about Apache2, but I'm not quite up on
> >>> "vhost". Are your lines above something I should put verbatim into my
> >>> /etc/apache2/sites-enabled/sitename.conf file, or am I supposed to
> tailor
> >>> them to my specific settings, and if so, I really have no idea how to
> go
> >>> about doing that.
> >>>
> >>> Thanks!
> >>>
> >>
> >> Hello,
> >>
> >> vhost = virtual host = 1 web site (short way)
> >> You need one file per vhost in sites-available/
> >>
> >> Wath I suggest is to configure -for ex.- :
> >> - vhostA with domain.tld
> >>     DirectoryIndex index.html
> >> - vhostB with sub.domain.tld (actual WP)
> >>     DirectoryIndex index.php
> >>
> >
> > So I did:
> >
> > cp /etc/apache2/sites-available/sitename.org
> /etc/apache2/sites-available/
> > beta.sitename.org
> >
> > Then edited the beta.sitename.org, changing the "DirectoryIndex
> index.html"
> > to "DirectoryIndex index.php", and changing "ServerName sitename.org" to
> > "ServerName beta.sitename.org".
> >
> > Then I created the symlink ("a2ensite beta.sitename.org").
> >
> > Then I restarted Apache2 ("systemctl restart apache2").
> >
> > Now when I web-browse to "sitename.org" I get the .html file as
> expected,
> > but when I browse to "beta.sitename.org" I get "Hmm. We're having
> trouble
> > finding that site."
> >
> >
>
> Did you make a DNS entry for beta.sitename.org in your DNS zone file??
>
> Tom
>
>
>
Oh-h-h... You think I have access to make DNS changes.

No. Looks like this route is a no-go then?



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Fri, Feb 23, 2018 at 9:26 AM, mlrx <ml...@18informatique.com> wrote:

> Le 23/02/2018 à 15:24, Kent West a écrit :
>
>> On Fri, Feb 23, 2018 at 1:18 AM, mlrx <ml...@18informatique.com> wrote:
>>
>>> Hello,
>>>
>>> is the simplest way be something like this (?) :
>>>
>>> vhost1 : actual WP conf
>>> vhost2 : DocumentRoot = WP directory
>>>           DirectoryIndex index.html
>>>
>>> In index.html, the button links to vhost1/index.php.
>>>
>>>
>>>
>> I apologize for being uneducated about Apache2, but I'm not quite up on
>> "vhost". Are your lines above something I should put verbatim into my
>> /etc/apache2/sites-enabled/sitename.conf file, or am I supposed to tailor
>> them to my specific settings, and if so, I really have no idea how to go
>> about doing that.
>>
>> Thanks!
>>
>
> Hello,
>
> vhost = virtual host = 1 web site (short way)
> You need one file per vhost in sites-available/
>
> Wath I suggest is to configure -for ex.- :
> - vhostA with domain.tld
>     DirectoryIndex index.html
> - vhostB with sub.domain.tld (actual WP)
>     DirectoryIndex index.php
>

So I did:

cp /etc/apache2/sites-available/sitename.org /etc/apache2/sites-available/
beta.sitename.org

Then edited the beta.sitename.org, changing the "DirectoryIndex index.html"
to "DirectoryIndex index.php", and changing "ServerName sitename.org" to
"ServerName beta.sitename.org".

Then I created the symlink ("a2ensite beta.sitename.org").

Then I restarted Apache2 ("systemctl restart apache2").

Now when I web-browse to "sitename.org" I get the .html file as expected,
but when I browse to "beta.sitename.org" I get "Hmm. We're having trouble
finding that site."



> I would like to point a detail:
> This directive
>     DirectoryIndex index.php index.html
> mean
>     serve index.php 1st if exists else serve index.html 1st
>
> Am I better for understanding?
>
>
>
I think I already understood this, but since I have both files, it only
serves up the first one, every time, which is not what I want.


Thanks!



> Regards,
>
> --
> benoist
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by mlrx <ml...@18informatique.com>.
Le 23/02/2018 à 15:24, Kent West a écrit :
> On Fri, Feb 23, 2018 at 1:18 AM, mlrx <ml...@18informatique.com> wrote:
>> Hello,
>>
>> is the simplest way be something like this (?) :
>>
>> vhost1 : actual WP conf
>> vhost2 : DocumentRoot = WP directory
>>           DirectoryIndex index.html
>>
>> In index.html, the button links to vhost1/index.php.
>>
>>
> 
> I apologize for being uneducated about Apache2, but I'm not quite up on
> "vhost". Are your lines above something I should put verbatim into my
> /etc/apache2/sites-enabled/sitename.conf file, or am I supposed to tailor
> them to my specific settings, and if so, I really have no idea how to go
> about doing that.
> 
> Thanks!

Hello,

vhost = virtual host = 1 web site (short way)
You need one file per vhost in sites-available/

Wath I suggest is to configure -for ex.- :
- vhostA with domain.tld
     DirectoryIndex index.html
- vhostB with sub.domain.tld (actual WP)
     DirectoryIndex index.php

I would like to point a detail:
This directive
     DirectoryIndex index.php index.html
mean
     serve index.php 1st if exists else serve index.html 1st

Am I better for understanding?


Regards,
-- 
benoist

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Fri, Feb 23, 2018 at 1:18 AM, mlrx <ml...@18informatique.com> wrote:

> Le 23/02/2018 à 05:14, Kent West a écrit :
>
>> On Thu, Feb 22, 2018 at 9:13 PM, Kent Frazier <fr...@sbcglobal.net>
>> wrote:
>>
>> Change the name of index.php to index1.php and access using that name?
>>>
>>>
>> That almost works. It allows me to open the index(1).php home page from my
>> link in index.html, but if I try to go any deeper, it loads the index.html
>> (while, interestingly, having the .php's deeper-level URL in the URL
>> address bar of the web-browser). So apparently, the rest of the .php-based
>> site expects its own index.php file to exist.
>> […]
>>
>
> Hello,
>
> is the simplest way be something like this (?) :
>
> vhost1 : actual WP conf
> vhost2 : DocumentRoot = WP directory
>          DirectoryIndex index.html
>
> In index.html, the button links to vhost1/index.php.
>
>

I apologize for being uneducated about Apache2, but I'm not quite up on
"vhost". Are your lines above something I should put verbatim into my
/etc/apache2/sites-enabled/sitename.conf file, or am I supposed to tailor
them to my specific settings, and if so, I really have no idea how to go
about doing that.

Thanks!



> Have a good day,
> --
> benoist
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by mlrx <ml...@18informatique.com>.
Le 23/02/2018 à 05:14, Kent West a écrit :
> On Thu, Feb 22, 2018 at 9:13 PM, Kent Frazier <fr...@sbcglobal.net>
> wrote:
> 
>> Change the name of index.php to index1.php and access using that name?
>>
> 
> That almost works. It allows me to open the index(1).php home page from my
> link in index.html, but if I try to go any deeper, it loads the index.html
> (while, interestingly, having the .php's deeper-level URL in the URL
> address bar of the web-browser). So apparently, the rest of the .php-based
> site expects its own index.php file to exist.
>[…]

Hello,

is the simplest way be something like this (?) :

vhost1 : actual WP conf
vhost2 : DocumentRoot = WP directory
          DirectoryIndex index.html

In index.html, the button links to vhost1/index.php.


Have a good day,
-- 
benoist

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to browse to index.php OR index.html on WordPress site?

Posted by Kent West <we...@acu.edu>.
On Thu, Feb 22, 2018 at 9:13 PM, Kent Frazier <fr...@sbcglobal.net>
wrote:

> Change the name of index.php to index1.php and access using that name?
>

That almost works. It allows me to open the index(1).php home page from my
link in index.html, but if I try to go any deeper, it loads the index.html
(while, interestingly, having the .php's deeper-level URL in the URL
address bar of the web-browser). So apparently, the rest of the .php-based
site expects its own index.php file to exist.

>
> On 2/22/2018 2:38 PM, Kent West wrote:
>
> I have a WordPress site that works. If my /etc/apache2/sites-enabled/sitename.conf
> file is set with the "DirectoryIndex index.php" directive, all is well, and
> pointing a web-browser to http://sitename.org loads the sitename's
> index.php file as it should.
>
> But I need to temporarily put up a dummy site, consisting of just a very
> simply index.html file. That's easy enough; I create the index.html file,
> and then change the sitename.conf file to "DirectoryIndex index.html" and
> restart Apache2. All is good.
>
> But I still need to manually be able to get to the full-blown .php-based
> site. When I web-browse to sitename/index.php, it reroutes to
> sitename/index.html. If I change the .conf file to "DirectoryIndex
> index.html index.php" and restart Apache2, that doesn't help.
>
> It seems I can serve index.html OR index.php, but not both at the same
> time (depending on the URL entered into the web-browser's URL bar).
>
> Bonus points after getting this to work: Adding a button in the
> "index.html" file that allows the viewer to "Click here to get to Full
> Site" that points to "index.php".
>
> I've been googling all morning and part of last night to figure this out,
> with no joy. Thanks for any help you can throw my way!
>
>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com
>
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com