Help With Domain Name for Ubuntu Server

I have a computer with Ubuntu installed and setup with Apache .  I have a domain name, and have pointed it to the IP address of the PC, which works, but I want it to go to a specific folder on the web server not the general folder, how can I do this.

Www.mydomain.com goes to 127.0.0.1 but I want it to go to 127.0.0.1/folder

My external IP address is obviously not 127.0.0.1.

Thanks
dkilbyAsked:
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.

Dr. KlahnPrincipal Software EngineerCommented:
To clarify the question:

You currently have Apache serving pages from "/", but you want it to serve pages from "/folder" instead?

If that is the case, then add this code to httpd.conf in the server's configuration directory:

#
# The default document base directory.
#
DocumentRoot /folder

Open in new window


If that is not what you're looking for, please expand on the problem statement a bit.
0
dkilbyAuthor Commented:
yes this is the issue but I am unable to locate the file you are talking about.
0
Dr. KlahnPrincipal Software EngineerCommented:
Open a command prompt and issue:

sudo find / -iname httpd.conf

Open in new window


That should reveal the location of the Apache configuration file.  Best to remember where it is, because you'll be using it a lot as time goes by and changes are made.
0

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
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

dkilbyAuthor Commented:
i ran the command, and even tried under root user and received the below error.

find: ‘/run/user/1000/gvfs’: Permission denied
0
Dr. KlahnPrincipal Software EngineerCommented:
Well, that does make it more difficult.  Look in /etc/init.d and see if there's an apache startup file; if there is, read through it and see if it specifies where the configuration files are.

Under Debian, it defaults to

CONF=/etc/apache/httpd.conf

Open in new window


Possible alternate locations:  /usr/local/apache/conf, /usr/local/apache2/conf
0
dkilbyAuthor Commented:
i found an apache2 file inside init.d and found these lines.

DESC="Apache httpd web server"
NAME=apache2
DAEMON=/usr/sbin/$NAME

when i go into /usr/bin  i dont see the file i am looking for.

I also looked into both other suggested folders and when I go into /usr/local  I dont see an apache or apache2 folder.
0
Dr. KlahnPrincipal Software EngineerCommented:
DAEMON=/usr/sbin/$NAME

Look in /usr/sbin.
0
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
Ubuntu

From novice to tech pro — start learning today.