Tag Info

New answers tagged

0

If you have a virtual host set up, the easiest way to implement the redirect is going to be to replace the virtual host configuration rather than remove it. A virtual host that only redirects has a very simple configuration. <VirtualHost *:80> ServerName sub.example.com RedirectPermanent / http://www.example.com/subdir </VirtualHost> ...


0

Apache2 Environment Variables It would be useful to know what Linux version and release distro the NAS is running due to the fact that Apache2 can be setup in various ways depending on what version of linux your using. Sometimes you need to edit etc/apache2/envvars gedit /etc/apache2/envvars Change: export APACHE_RUN_USER=www-data export ...


1

Looks like you are encrypting the traffic twice - once over WAN and another time over LAN. Normally, the reverse proxy would be set up as the SSL termination point as it is usually unnecessary to encrypt the traffic over a secure LAN connection. From your Apache configuration, the reverse proxy (Server ALPHA) is connecting to the web server (Server BETA) ...


0

NON-WWW URLS TO WWW WITH HTTPS USING HTACCESS: You can add the following code to your .htaccess file, you can find it in your website root directory, if you don't find it you can copy this in a text editor and save it as .htaccess, then upload it. p.s.: Make sure that you backup the .HTACCESS file before you proceed. Incorrect codes can lead to 500 ...


1

You should only serve very generic error page to the user, as providing more details on error may disclose highly valuable information for malicious attacker. However you need more information for debugging. There are following solutions: Log all error information rather than just responding with it. This is good for production servers as allows to ...


1

These sort of entries are common with most websites. I get plenty of them in my apache logs. If you have a secure server configuration, there is nothing to worry about. For example, the fourth entry was probably some bot looking for a phpmyadmin installation file on your server. The second entry was probably a purposeful stray entry for promotional ...


2

It depends on your situation. Your PHP could also handle the lack of database connection in a nice way. But if you have a custom PHP with many possibilities for bugs and problems, go for an HTML page. If you're using a system such as Drupal or WordPress it's best to go with whatever is provided there, possibly adding something such as a module such as ...


3

This really depends on the error being served. For a 404 error, there would be no reason that there are any issues with the server - meaning all the php stuff should be working find. But if you have a 500 there may be an issue with the server, preventing php from running. This really depends on your tolerance for risk.


3

I would say yes, simply because there isn't any need for dynamic error pages. For example: If your database is down or under pressure, it is unlikely that you will want your error pages to be attempting database connections. Likewise, if your server is under pressure, you don't want your error pages to be carrying out any server-side processing. All-in-all, ...


0

Easy. Just set something like this within your main configuration or your virtual configuration: <Directory /var/www/path/to/your/web/documents> Order Deny,Allow Deny from all Allow from 127.0.0.1 ::1 Allow from localhost Allow from 192.168 Allow from 10 Satisfy Any </Directory> The <Directory></Directory> statement ...


0

Add this section inside your virtual host directive: <Location /mypathurl> Order deny,allow Deny from all Allow from 192.168.1.10 </Location> Replace your IP above. This should not be used for financial level security, FYI.


1

to clarify your question it seems like you have a broken image link after a sever migration on drupal based site? when the link was created you must have visited your server by ip address vs domain name. then drupal created a full link to the image versus creating a relative link. you should update whatever code, module or plugin that is generating the ...


8

For your first two rewrites (non-www → www, http → https), the following rule should work: RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !=www.example.com [NC] RewriteRule ^(.*) https://www.example.com/$1 [NS,L,R=permanent] Just replace www.example.com with the actual canonical hostname of your site. As for your third ...


2

You can't check for the query string using the RewriteRule pattern (the query string is stripped before pattern matching, as is the hostname, etc). So, the rules you stated above simply won't match and you'll get a 404. However, you can use the RewriteCond directive to check the query string: For example: domain.tld/en/abc.php?foo to ...



Top 50 recent answers are included