Path setup on PHP server

I have moved my php website to the following path :

/var/www/html/mydomain.com/public_html

There are three folders under there :
cms    
sc_web
web

The content inside sc_web & web is actually the same but with different language (Chinese and English).  Contents within CMS is shared by sc_web and web.

Is it possible to set up the default website to run on /var/www/html/mydomain.com/public_html/web/index.php ? I have tried to set the following path under httpd.conf but it can't refer the cms content properly. Any idea ?  

DocumentRoot /var/www/html/mydomain.com/public_html/web

Thx
AXISHKAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
No, you can't access folders outside of the Document Root through the browser.

You need to make CMS and sc_web aliased folders or sub folders of the main document root.

I would look at setting up aliases - that way each can have it's own URL
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
1) The content inside sc_web & web is actually the same but with different language (Chinese and English).

Okay. This is fine, so long as you follow Google's requirements for serving multi-lingual content... if SEOing your content is important.

This is a complex topic. If it's important to you, search for details or look at how WordPress approaches this or better, use WordPress as your framework + use their language translation facility with all your content.

2) Contents within CMS is shared by sc_web and web.

There are two general ways for shared content to work. Either symlink the content of your cms directory into your sc_web + web directories or use Julian's suggestion of an Apache (or equivalent) alias strategy. Without knowing the exact structure of all your content, challenging to suggest what might be best.

3) Is it possible to set up the default website to run on /var/www/html/mydomain.com/public_html/web/index.php?

Yes. Just point your DocumentRoot to /var/www/html/mydomain.com/public_html/web.

4)  I have tried to set the following path under httpd.conf but it can't refer the cms content properly. Any idea ?

To little information.

Do the following...

echo docroot > /var/www/html/mydomain.com/public_html/web/foo.txt

And state whether you can access https://mydomain.com/foo.txt normally (browser or curl or whatever you use for testing).

If you can't debug till you can.

If you can, then something's broken in step #2 above. Either your symlinking or aliasing requires fixing.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.