Tag Info

Hot answers tagged

2

Apache does provide best practice advice in the documentation. Apache Virtual Host documentation Apache > HTTP Server > Documentation > Version 2.4 On this link youll find a list of documentation pages which explain all details of virtual host support in Apache HTTP Server. https://httpd.apache.org/docs/2.4/vhosts/ --> ...


2

Although it looks like Stephen answered your question I figured I would respond to the title of the question, "Setting up a LAMP VM server for Development and Testing?" Get Virtual Box, it's free and easy to use. Get the ISO for Ubuntu, Debian or the operating system that best mimics your production environment. You might have to spend money. Microsoft ...


2

MySql Use mysqldump to get the data out of your live database Transfer the dump file to your VM Use mysql command to import the data Here is a website that can walk you through the process: http://www.mydigitallife.info/how-to-backup-and-restore-export-and-import-mysql-databases-tutorial/ If your PHP code has the db user and password hard coded, then ...


2

You don't need the asterisk(*) after www. <Directory /var/www/> Options -Indexes FollowSymLinks MultiViews AllowOverride none Order allow,deny Allow from all </Directory> I'm not a huge fan of allowing indexes, so I disabled those and removed the asterisks. The above will deny indexes and grant allow access to any ...


2

You can use the .htaccess file to redirect from IP to domain using this code: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^555\.555\.555\.555 RewriteRule (.*) http://www.example.com/$1 [R=301,L] Change 555.555.555.555 to match the IP of your server, additionally though you can use canonical urls that will prevent duplicates entering ...


2

An alternative fix would be to enforce the trailing slash on the end of your URLS - this would have the benefit of preventing duplicates if your not using Rel Canonical. SOURCE This will redirect all requests without a tailing / to the URL with the slash on the end. (note within the 2nd part of the bracket is those file extensions to ignore.. ...


2

In your custom 404 page you could check the structure of the URL and 301-redirect if it looks good - or preferably look it up against a known list of previous Wordpress URLs. At least this way you are only doing the lookup/redirect if the page doesn't exist. If you are doing 1000s of redirects with Apache, it will be more efficient/faster to do this in ...


1

Try using this under <Directory> AllowOverride All And make sure there isn't a .htaccess file that disables directory browsing in the directory that you're making the request to (and restart Apache). Update: Make sure that the mod_autoindex module is loaded along with the mod_dir module. Without the former, you'll get an error when browsing ...


1

Your Apache access logs should log the IP address of visitors by default. If your CMS system handles the login and sets a cookie for the logged in user, you must have Apache log that cookie to be able to see the logged in user. You can do so by modifying the log config with the name of the cookie: %{Foobar}C (where Foobar is the name of the cookie). For ...


1

I suggest reading the official Python docs that explain how to run Python on a web server. In short, they recommend WSGI. For Apache, there's a "quick" installation guide on the mod_wsgi Google project page. If you're using a Python framework such as Django, a guide to using mod_wsgi with Django is available. Finally, if setting up and maintaining your own ...



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