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?
 
Dr. KlahnConnect With a Mentor Principal 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
 
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
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.