Solved

Stopping wget on Apache2 Ubuntu server

Posted on 2008-10-06
6
428 Views
Last Modified: 2013-11-15
I have a Ubuntu 8.04.1 server that serves PHP,MySQL and Java.
 It uses Apacee2, to protect the code I want to disallow WGET preferably globally
 without needing to enable .htaccess

 What command is required in what file in the /etc/apache2 directory to acheve this ?

 
0
Comment
Question by:itlearner1
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
urgoll earned 250 total points
ID: 22655895
Hello,
I'm not sure why you want to disallow wget. wget is a command-line utility that simulates a web browser access, i.e. it cannot do anything a browser wouldn't be able to do.

wget should not be able to look at your PHP code; PHP is executed on the web server, and is used to generate your actual viewable content. If you can get at the PHP code using WGET or a web browser, PHP is not properly executing on your server and is a completely different question.

Hope this helps clear things up,
Christophe
0
 

Author Comment

by:itlearner1
ID: 22656292

 On the advice of a Wiley book. But the book describes only how to do it with .htaccess which is
 disabled on my machine because I understand it to be better to handle security globally through apache
 config files if possible. Unfortunately apache is done differently in Ubuntu then what is described in most
 articles on the net.
0
 
LVL 4

Expert Comment

by:urgoll
ID: 22656525
To be pedantic, .htaccess is also an Apache config file. Though it is true that it's marginally better to handle it centrally for two reasons:
- all the information is located in a single place; and
- if .htaccess is completely disabled, then apache will not waste time looking for it on every request, so you get a small performance gain.

That said, can you give me the reference to the Wiley book (title, author, ISBN, page number) ? I can look it up and get a feeling for what they are trying to achieve. As I said, if PHP is properly configured your web server should execute the PHP code, not serve it to the web client.

Regards,
Christophe
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best Linux Distro for this software 10 71
Best IDE for PHP starters 11 134
whm high memory usage in processes 7 103
web server: redirect 123.domain.com to www.domain.com/123 16 38
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question