Redirect joomla url to dns name

HI All ,

my joomla application is running 192.168.1.203 system in httpd
sever,Operating system Fedora 14.
URL : http://192.168.1.203/joomla

I want redirect this url with some good name like ,
srinivas.walkingtree.in
(it was created by dns server for ip 192.168.1.150).

my nginx,conf file .(nginx server = 192.168.1.150)

server {
listen 192.168.1.150:80;
server_name srinivas.walkingtree.in;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.1.203/joomla;
}
}

At first , When i access http://srinivas.walkingtree.in . This is
working .
If i click on any button (products), it is redirecting to
http://192.168.1.203/joomla/products .

Please help me .

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233546,233546#msg-233546

On Tue, Dec 04, 2012 at 04:10:51AM -0500, srinivasa.nallapati wrote:

Hi there,

server_name srinivas.walkingtree.in;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.1.203/joomla;
}

At first , When i access http://srinivas.walkingtree.in . This is working .
If i click on any button (products), it is redirecting to
http://192.168.1.203/joomla/products .

http://nginx.org/r/proxy_set_header

Most likely you can get it to do what you want by adding

proxy_set_header Host $host;

beside the other proxy_set_header lines.

f

Francis D. [email protected]

Thanks ,

Now i used the follow thing ,

server {
listen 192.168.1.150:80;
server_name srinivas.walkingtree.in;
location / {

proxy_pass  http://192.168.1.203/joomla/;
proxy_redirect     off;

proxy_set_header   Host             $host;
proxy_set_header   X-Real-IP        $remote_addr;
proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;

client_max_body_size       10m;
client_body_buffer_size    128k;

proxy_connect_timeout      90;
proxy_send_timeout         90;
proxy_read_timeout         90;

proxy_buffer_size          4k;
proxy_buffers              4 32k;
proxy_busy_buffers_size    64k;
proxy_temp_file_write_size 64k;

}
}

when i click on products ,
http://srinivas.walkingtree.in/joomla/index.php/products

error:

Not Found
The requested URL /joomla/joomla/index.php/products was not found on
this
server.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233546,233559#msg-233559

Thanks ,

Now the page is loading but ,No images ,No colors and no css etc…

it is coming just like basic index page .

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233546,233561#msg-233561

proxy_redirect     off;
proxy_read_timeout         90;

proxy_buffer_size          4k;
proxy_buffers              4 32k;
proxy_busy_buffers_size    64k;
proxy_temp_file_write_size 64k;

}
}

when i click on products ,
http://srinivas.walkingtree.in/joomla/index.php/products

Try: http://srinivas.walkingtree.in/index.php/products

–appa

srinivasa.nallapati Wrote:

srinivasa.nallapati Wrote:

Thanks ,

Now the page is loading but ,No images ,No colors and no css etc…

it is coming just like basic index page .

sorry for wrong information ,

in developer tools , the below error is coming

GET
http://srinivas.walkingtree.in/joomla/components/com_virtuemart/assets/css/facebox.css
404 (Not Found) /:12

it is calling joomla after dns name

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233546,233565#msg-233565

On Tue, Dec 04, 2012 at 08:20:37AM -0500, srinivasa.nallapati wrote:

Hi there,

GET

http://srinivas.walkingtree.in/joomla/components/com_virtuemart/assets/css/facebox.css

404 (Not Found) /:12

What file, on what server, does that “facebox.css” correspond to?

If you issue the request with “curl -i”, can you see whether the 404
message came from nginx or from something else?

Untested, but I suspect that you want either

location / {
proxy_pass http://192.168.1.203;
# the rest of the config goes here
}

or

location /joomla/ {
proxy_pass http://192.168.1.203/joomla/;
# the rest of the config goes here
}
location = / {
return 301 /joomla/;
}

to achieve what you want – but it’s not yet clear exactly what you
want.

http://nginx.org/r/proxy_pass for details.

f

Francis D. [email protected]

srinivasa.nallapati Wrote:

Thanks ,

Now the page is loading but ,No images ,No colors and no css etc…

it is coming just like basic index page .

in developer tools , the below error is coming

GET
http://demojoomla.walkingtree.in/bapoc/components/com_virtuemart/assets/css/facebox.css
404 (Not Found) /:12
GET
http://demojoomla.walkingtree.in/bapoc/components/com_virtuemart/assets/css/vmsite-ltr.css
404 (Not Found) /:13
GET
http://demojoomla.walkingtree.in/bapoc/media/system/js/mootools-core.js
404 (Not Found) /:14
GET http://demojoomla.walkingtree.in/bapoc/media/system/js/core.js 404
(Not
Found) /:14
GET http://demojoomla.walkingtree.in/bapoc/media/system/js/caption.js
404
(Not Found) /:14
GE

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233546,233564#msg-233564

On Tue, Dec 04, 2012 at 10:46:58AM -0500, srinivasa.nallapati wrote:

Hi there,

Actually i am running joomla in httpd server . URL :
http://192.168.1.203/joomla/;

I want acces this url with name like srinivas.walkingtree.in

If you are happy for the user to see

http://srinivas.walkingtree.in/joomla/

and what was suggested does not work for you, then please be specific
about what exact configuration you used, what url you tried to access,
what response you got, and what response you expected to get.

Ideally, copy-paste the “curl -i” commands which show the problem.

If you do not want the user to see
http://srinivas.walkingtree.in/joomla/,
then some other changes will be needed. Possibly using proxy_redirect
(http://nginx.org/r/proxy_redirect) will help, or possibly some
configuration on the joomla side will be needed to allow it to be hidden
in a subdirectory behind a reverse proxy.

When i browse srinivas.walkingtree.in .it is working ,if i click any button
in this appllication , it is redirecting to again
http://192.168.1.203/joomla/

The first line there is:

curl -i http://srinivas.walkingtree.in/

and you can compare what you get with what you expect.

The second line is something else. Instead of clicking on a button,
right-click and “copy link location” or “copy shortcut” or do whatever
your browser needs to store the url you are about to access; then paste
that url into the command line

curl -i

and again you can compare what you get with what you expect. For
example,
you probably don’t expect to see the address 192.168.1.203 anywhere in
the response.

Unless you show exactly what you do, what you see, and what you expect
to see; it is difficult for others to offer useful help.

f

Francis D. [email protected]

Sorry !

Actually i am running joomla in httpd server . URL :
http://192.168.1.203/joomla/;

I want acces this url with name like srinivas.walkingtree.in
When i browse srinivas.walkingtree.in .it is working ,if i click any
button
in this appllication , it is redirecting to again
http://192.168.1.203/joomla/

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,233546,233575#msg-233575

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs