Configure urls in web server

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Configure urls in web server

Post by imran_khan »

Hello,

I want to configure below urls in nagios web server. When browse the below url then it will ask for download for both the urls. Also when we just browse http://IPaddressofnagioserver/pqrs url it will not show any files. It will display file permission error or blank page . Please find the details for the same.

http://IPaddressofnagioserver/pqrs/xyz1.exe
http://IPaddressofnagioserver/pqrs/xyz2.exe

Nagios Core:- 4.0.7
OS:- CentOS-6.5
Apache version:- 2.2.15

Thanks,
Imran Khan.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Configure urls in web server

Post by eloyd »

It is hard to understand exactly what you are asking for, but I think you are saying that you want to configure Apache to have a /pqrs alias that will take you to a page that lets you download the two EXE files. If that is correct, then that is an Apache question, not a Nagios question. You should ask on an Apache forum.

If I am not understanding you correctly, then I would need more information.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Configure urls in web server

Post by imran_khan »

Hello,

I have done the below changes on nagios server.
1). Created pqrs folder under /var/www/html/ folder.
2). Created .htaccess file under /var/www/html/pqrs folder.
3). Copied xyz1.exe and xyz2.exe in /var/www/html/pqrs folder.
4). Set the permission 711 of /var/www/html/pqrs folder.
5). Restarted Nagios and apache service.

Once above changes done getting below error while accessing Nagios interface (http://domainname/nagios), due to this I have created thread in Nagios forum.

Error:-
Forbidden
You don’t have permission to access /nagios/ on this server.

Thanks,
Imran Khan.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Configure urls in web server

Post by eloyd »

You will most likely want to change protections to 755 and not 711, but that is not your problem.

Nothing that you wrote should have any affect on your server's ability to server nagios pages. So something else must be going on.

What happens if you

Code: Select all

mv /var/www/html/pqrs /tmp
and restart apache?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Configure urls in web server

Post by imran_khan »

Hello,

When moved files/folder from /var/www/html/ to any other folder. I am able to access nagios.
But things is that I want to configure mentioned urls on IP Address of the server.

Thanks,
Imran Khan.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Configure urls in web server

Post by imran_khan »

Hello,

Any help/suggestion?

Thanks,
Imran Khan.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Configure urls in web server

Post by sreinhardt »

Are you moving files or directories? Could you post the command you ran that allowed the nagios pages to load, or even better that and several of the commands you ran before that?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Configure urls in web server

Post by eloyd »

Spenser, I'd asked him to basically undo the changed he made by doing:

Code: Select all

    mv /var/www/html/pqrs /tmp
That seemed to fix the symptom, but not the problem.
Last edited by eloyd on Mon Aug 18, 2014 7:40 pm, edited 1 time in total.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Configure urls in web server

Post by abrist »

Did you create an apache vhost file for this? If so, can you post it?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked