Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-14-2010, 01:32 AM
|
#1
|
|
Member
Registered: Apr 2010
Posts: 179
Rep:
|
DNS settings on a local network
hi guys, how to resolve an ip with a port in linux?
i mean like this:
http://192.168.1.10:8000, how to include this on the dns. So the user don't have to remember the ip address and the port.
like the user will only type http://scanfiles then it will resolve the corresponding ip. is it possible?
Thanks.
|
|
|
|
12-14-2010, 02:32 AM
|
#2
|
|
Member
Registered: Sep 2005
Location: Poland
Distribution: Debian, Ubuntu
Posts: 38
Rep:
|
.htaccess, mod_http_proxy and mod_rewrite with apache:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^scanfiles$
RewriteRule ^(.*)$ "http\:\/\/192\.168\.1\.10\:8000%{REQUEST_URI}" [P,QSA,L]
|
|
|
|
12-16-2010, 07:54 PM
|
#3
|
|
Member
Registered: Apr 2010
Posts: 179
Original Poster
Rep:
|
Quote:
Originally Posted by Angel2953
.htaccess, mod_http_proxy and mod_rewrite with apache:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^scanfiles$
RewriteRule ^(.*)$ "http\:\/\/192\.168\.1\.10\:8000%{REQUEST_URI}" [P,QSA,L]
|
Hi Angel, sorry quite new with apache so i had to edit those files .htaccess, mod_http_proxy and mod_rewrite and place those codes? thanks.
|
|
|
|
12-17-2010, 02:16 AM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,676
|
Quote:
Originally Posted by JJJCR
Hi Angel, sorry quite new with apache so i had to edit those files .htaccess, mod_http_proxy and mod_rewrite and place those codes? thanks.
|
No, you'd create a .htaccess file in the right location and use the modules by virtue of the directives listed. My personal preference would be to put any config in your httpd.conf directly, not in an .htaccess file.
Another approach could be to use mod_proxy:
ProxyPass / http://127.0.0.1:8080
within the virtualhost for the "scanfiles" website. That way you don't redirect the client at all, and you always have the nice looking url.
Note that the solution given here does NOT answer your question, as your question is an invalid one. DNS names have nothing whatsoever to do with ports, it doesn't make sense to resolve something to a port, so you'd do it in a different way.
Last edited by acid_kewpie; 12-17-2010 at 02:20 AM.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:47 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|