Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Setting up some directories on my server. When I go to: http://www.cynthiablue.net/fur/forums/
I can reach the page. However, typing in: http://www.cynthiablue.net/fur/forums
gives me a not available error. How come that last backslash is mandatory, and is there a setting I can change that will allow the URL without a backslash?
Are you running Apache? If so, you can alter the ServerName of your httpd.conf file to allow for the URL to work without the trailing slash... please refer to a previous post:
Okay I went to my conf file and tried it... I'm still not able to browse to the directory without a slash. Forgive me, I'm very new to Linux.
My Servername was set to mydomain.com... I changed it to www.mydomain.com, and no change. The Apache page says:
Quote:
If you are using name-based virtual hosts, the ServerName inside a <VirtualHost> section specifies what hostname must appear in the request's Host: header to match this virtual host.
I have my main domain name (only one I currently have on there atm), set as the Default Virtual Host. I added a second URL just for fun (it's not real, I figured it can't hurt) in the virutal host section. On my primary URL virtual host section the ServerName is _default_:80. When I try to change this to www.cynthiablue.net, I am unable to restart httpd... the error I get is:
httpd failed. The error was: Stopping httpd: [ok]. Starting httpd (99)Cannot assign requested address: make_sock: could not bind to address 198.IP:80 no listenign sockets aailable, shutting down [failed].
If you are using www.mydomain.com literally, and "hostname" does not reflect www.domain.com, then it will not work. Apache is not going to recognize www.mydomain.com on your server and resolve properly.
Try using your IP number for the ServerName. Use ifconfig to find the IP number for your server.
Just out of curiosity, I see your domain is hosted through Verio, did you have Verio direct your domain to your server?
Thanks.
Last edited by speedracer05; 12-28-2002 at 02:57 AM.
If you shutdown Apache, then try to access your site, are you still able to view your site? It may take a little while for the DNS to be updated before you can actually see your changes.
Can you access your site locally? I mean using http://localhost/fur/forums/? If so, try updating httpd.conf, then restarting, and checking your changes locally.
Hmm.. not sure we are understanding each other. I can access my site fine, and I haven't made any changes to my dns manager. Changing the ServerName doesn't seem to be changing whether I can access my site or not. The only problem I'm having, is getting apache to differentiate between a file and a directory. If there is no slash, it thinks it's a file, and I get page not found. If there is a slash, it goes to the right page in the directory.
Maybe I'm not understanding what you mean... Each time I make a change, I've shut down and restarted apache.
If so, the changes that you make to Apache will not take affect immediately. Otherwise, if you make changes to your ServerName, you will need to wait a little while before your changes take affect.
I'm having sort of a similar problem. (It mat or may not be related to Cynthia's problem, but I'll throw it out there anyway.)
I put a few pictures in a directory under the html root. When I access it from behind my router, everything is peachy. If I try to access the folder from outside it only works with the trailing "/". It looks like when the "/" is left off, apache tries to send it to the local ip addy (192.168.1.X) instead of the ISP assigned IP or even the name. (I set up an account with No-IP, so I can access my systems without having to try to find the IP address when I'm not at home.
Hopefully this will shed some light on the problem.
So, it seems apache thinks that the url with no slash is a file, and cannot find that file, because I don't have a file of that name. It's a directory.
Oh, and yes, if I stop apache, then I cannot see my site. It's pretty instantaneous.
Last edited by Cynthia Blue; 12-30-2002 at 10:18 PM.
Okay, I just wanted to make sure that your changes were instantaneous.
If you are behind your router, refering to DeezNutz post, you could use your local IP for the ServerName and the trailing slash problem should be rectified.
I should have included this in my previous post...
Here is what your httpd.conf should look like with an example rewrite rule for your "fur" directory (assuming that your root directory is /var/www/html):
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes Includes FollowSymLinks
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
#
# HERE IS OUR REWRITE INFORMATION
#
RewriteEngine on
RewriteBase /
RewriteRule ^fur$ fur/ [R]
</Directory>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.