Hot answers tagged

18 votes

Allowing access to an Apache virtual host from the local network only

People landing in this answer, please note that this is specific for Apache 2.2. Apache 2.4 has deprecated these directives. The new way is using the module mod_authz_host and the Require directives....
10 votes
Accepted

Have disabled apache site config file 000-default.conf, but it still seems active. Why?

Just as a matter of explanation for future users. Your 000-default.conf file is a catch-all site and should be left alone. It is good for security. It can be frustrating when a site configuration ...
  • 32.7k
8 votes
Accepted

Vulnerability in /boaform/admin/formLogin?

This appears to be related to a cluster of exploits that target fiber optic routers. If you are running a simple HTTP website and you are not maintaining fiber optic router equipment, I believe you ...
7 votes
Accepted

Can file encoding change when FTP is used?

You are probably seeing a difference in line-endings. When transferring a file in ASCII/Text mode (as opposed to "Binary mode") then most FTP clients will convert/normalise line-endings to the OS ...
  • 42k
5 votes

If i use 301 redirects (to bounce the requests), will the other destination be aware of my Server IP?

Well aren't you friendly... "Hey Google, I'm having a DOS, but im making it your problem, thanks" First: There is no difference for you between serving an 301 or an 404 error page. Your ...
  • 6,776
5 votes

Getting root access in 1and1 hosting?

You have a shared hosting plan. That means you cannot install software. Your SSH access is primarily meant for managing files remotely. You may be able to run Java or whatnot with your account, but ...
  • 206
4 votes

How do I use URL redirection with reverse proxy?

Under Apache, using the ProxyPassReverse directive will do what you want. It will take the redirect from the backend server and replace the backend host name with the front end name. From the ...
3 votes
Accepted

Redirect at exact moment in time

You could just include a rule in your index.php to check the current time against the time you want to launch. So if you wanted to launch on 2015-12-01 at 15:00UTC, something like this should work: &...
  • 5,834
3 votes

File priority in Joomla website

If you create a page using Joomla and call it 'sitemap' it should display the content of that created page in the theme framework 'on the fly' for you. Joomla does not create a sitemap.html or sitemap....
3 votes

Using PHP inside .html files not working as expected

<!--?php echo "It works!"; ?--> This is what you see when you analyse the element using the browsers Object Inspector ie. the interpreted source. This is not the HTML source as sent from the ...
  • 42k
3 votes

Have disabled apache site config file 000-default.conf, but it still seems active. Why?

I agree with user 'closetnoc' who replied at [2015-Aug-2 00:24:36Z] in response to the original post that wrote "The 000-default.conf site is a catch-all for any request the server does not have a ...
  • 31
3 votes

Can file encoding change when FTP is used?

Yes. Don't transfer UTF-16 files in ASCII mode; use binary mode to avoid data corruption here. FTP's transformation of \r\n to \n will corrupt the remainder of the file if it happens to contain the ...
  • 131
3 votes
Accepted

Apache not working on AWS Linux after reboot - 301 Response code

I figured out the issue. When an AWS instance is rebooted, the DNS address changes. As I am using Wordpress, I need to update the siteurl and home url in the MySQL Database for the wordpress site to ...
3 votes
Accepted

Separate web hosting and mail server (CPanel)

There is absolutely no need for a mail server to be on the same machine, in the same building, or even located in the same country as the web server. In your DNS records you will see MX records, ...
  • 1,802
3 votes
Accepted

Google Analytics showing a big spike of Linux Chrome users

As the multiple previous people mentioned, you need to check your data. A huge amount of that traffic could be from one IP, it's trivially easy to write a bot that rotates fictional IP addresses. Even ...
  • 2,077
2 votes
Accepted

WHM Root Password Stops Working

The problem seems to have been resolved. I was going through the logs and noticed the server was under constant root login attack. I have installed DenyHosts and denied SSH login with passwords. The ...
2 votes

WHM Root Password Stops Working

You are right. This behavior is very similar when cPHulk Brute Force Protection blocks your IP address or the account. If only your IP address is blocked then it is easy to get access back by ...
2 votes
Accepted

Sandbox a folder in linux / CPanel

I would personally recommend installing a Linux System Container Manager, such as LXD, to set up a Linux Container on your server to isolate the folder from the rest of the system. Try LXD Online ...
  • 1,173
2 votes

Using PHP inside .html files not working as expected

My apache installation has a php5.conf file I added this to it. <FilesMatch ".+\.html$"> SetHandler application/x-httpd-php </FilesMatch> In my .htaccess file I also changed ...
  • 51
2 votes

How do I migrate mail from one shared hosting account to another?

I would like to share the steps I followed recently in regards to this question. If you want to transfer the email accounts and messages for a domain from one server to another, you can easily do ...
  • 161
2 votes
Accepted

Trying to install web2py on a shared server (Dreamhost)

Well, I wasn't able to get things working following this tutorial, and many tests and variations. Finally, I found a very interesting link in the uWSGI site, which actually made things work! The only ...
  • 171
2 votes

Enable remote access to MySQL server (Linux)

You should only allow a static remote IP access to your local MySQL server, since enabling all IP addresses is a security hazard. Use the guide below as a reference for the procedure that you need to ...
  • 32.7k
2 votes

Can file encoding change when FTP is used?

Yes , ftp does some encoding changes. Data is transferred from a storage device in the sending Host to a storage device in the receiving Host. Often it is necessary to perform certain transformations ...
2 votes

Can file encoding change when FTP is used?

The answer I've accepted on this is correct however I'm adding some notes about how I used this information to work out what was going on. The question uses file1.html and file2.html for simplicity. ...
  • 247
2 votes
Accepted

What does "Require all granted" on Directory / (root) REALY means? (Apache 2.4 on CentOS7

This is an issue I've ran into a few times & it stems from a change in terminology from Apache 2.2 to Apache 2.4 (detailed here). Access control options that were previously addressed with 'Order ...
2 votes

.htaccess redirect based HTTP_REFERER

Shouldn't you be redirecting the blogs themselves instead? You would need to do so anyway to help the search engines and referral links. That way the page that the t.co links points to will get picked ...
2 votes

Logged Out Too Soon; PHP Sessions Expire Too Quickly. Is this a Linux, CentOS, Cookies, CPanel problem?

Thanks for the trouble-shooting help. I have solved the problem -- by specifying a custom folder for storing temporary session data. Here's how: Locate the folder where your session data files are ...
  • 51
2 votes

Change server structure to be able to view files/folders in browser (Dedictaed server)

Web servers don't make every file on a computer available. That would be a huge security problem. Rather, by default they make a single directory available. As the message says, that directory is /...
2 votes
Accepted

Dealing with a massive images/assets directory in a staging environment

Generally, it's not a good idea to share content between a live site and its staging installation. A staging copy should be isolated, precisely to avoid messing up anything on the production ...
  • 266
2 votes

CPanel Rearrange account can't find home2

I've contacted CPanel's support. The problem was you need to setup 2 variables in En WHM -> Server Configuration -> Basic WebHost Manager® Setup, HOMEMATCH and HOMEDIR I was changing just the ...

Only top scored, non community-wiki answers of a minimum length are eligible