Common File Types and Server Configurations
Common File Types and Server Configurations
OVERVIEW
While downloading files and viewing websites, you’ll meet up with many file formats. Most
are common, and encountered frequently, others are more obscure and require specialist
programs to open or use. Here, we have a list of the file types, along with the applications
you’ll need to get them going on your computer.
There are many different file types that you may come across; some of these might be for
media such as .jpg, .mp3, .mp4, etc. Below are some of the more common file types you’ll
see:
.mpg .ppt
.wav .bmp (.pptx) .asp
(.mpeg)
Server Configuration Files are created to manipulate the way a server runs. These files can
be used in a series of different ways depending on their application. We’re going to cover
the 3 of the more common ones, as they can have an impact on our ability to troubleshoot
customer’s website issues, and in some cases, in the resolution to a customer’s issues.
A .htaccess is a configuration file for use on web servers running the Apache
Web Server software. When a .htaccess file is placed in a directory which is in
turn ‘loaded via the Apache Web Server’, then the .htaccess file is detected and
executed by the Apache Web Server software. These .htaccess files can be used
to alter the configuration of the Apache Web Server software to enable/disable
additional functionality and features that the Apache Web Server software has to offer.
These facilities include basic redirect functionality, for instance if a 404 file not found
error occurs, or for more advanced functions such as content password protection or
image hot link prevention.
The 'dot' before its name makes it a hidden file in UNIX based environments (this is why
you must select “force show hidden files” when connecting via FTP, otherwise it will not
be visible as it is a hidden file by default.
Authorization
A .htaccess file is often used to specify security restrictions for a directory, hence the
filename "access". The .htaccess file is often accompanied by a .htpasswd file which
stores valid usernames and their passwords
URL rewriting
Servers often use .htaccess for rewriting long, overly comprehensive URLs to shorter
and more memorable ones.
Blocking
Use allow/deny to block users by IP address or domain. Also, use to block bad bots,
rippers and referrers. Often used to restrict access by web crawlers
SSI (Server Side Includes)
Enable server-side includes.
Directory listing
Control how the server will react when no specific web page is specified.
MIME types
Instruct the server how to treat different varying file types.
Cache Control
If you are getting errors on your website, the .htaccess file can often be the culprit. This is
easily tested by renaming your current .htaccess file. Simply rename the .htaccess to
.htaccess-old and reload the website. If the site loads then you know the issue resides in
the configuration of the .htaccess file. If it does not fix the issue rename the htaccess by
removing the -old so it won't affect the website after the issue is resolved.
A Web.config file is the main settings and configuration file for an ASP.NET web
application. It is an XML document that resides in the root directory of the site or
application and contains data about how the web application will act. This information
controls module loading, security configuration, session state configuration, and
application language and compilation settings. Web.config files can also contain
application specific items such as database connection strings.
At the top of the hierarchy sits the Machine.Config file, which specifies the settings that are
global to a particular machine. You can override settings in the Machine.Config file for all
the applications in a particular Web site by placing a Web.Config file in the root directory of
the Web site.
301 Redirects
Forcing HTTPS
Forcing your site to route through https instead of http. This is important if the
customer is planning on using an SSL.
The php.ini file is the default configuration file for running applications that require PHP.
It is used to control variables such as upload sizes, file timeouts, and resource limits.
A good tip is to first upload an info.php file to list the current server specs for php. It can
also make it easier to modify the specifications, as well as confirm when the changes
take effect.
This can be used to retrieve data from remote servers or websites. However, if incorrectly
used, this function can compromise the security of your site.
PHP.INI | TROUBLESHOOTING
Troubleshooting a php.ini would entail ensuring the file itself is in the correct directory (cgi-
bin for NetSol VUX hosting). From there you can utilize an info.php file to confirm if the
modification entered in the php.ini are taking effect on the server.