Does anyone have any experience with setting up a development server? I'm very close but need one hurdle jumping!
I've installed Apache on my Ubuntu 7.10 system so I can use it as a test server. Everything went fine, PHP and MySQL installation was great, no problems.
I can't seem to get mod_rewrite working via .htaccess files though. I've made sure the rewrite module is installed and running - phpinfo() says that it is.
This is the config file for my site - in /etc/apache2/sites-enabled/alex1
Quote:
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /home/alex/sites/alex1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/alex/sites/alex1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
|
I've tried changing the
bold line from None to All, as some tutorials state, restarting Apache after the change with no success.
My .htaccess file (in /home/alex/sites/alex1) has one rule for testing:
Quote:
|
RewriteRule ^/?([a-zA-Z0-9])/?$ index.php?getvar=$1
|
I wasn't certain if I needed to add the following to make it work - but I tried with each of them alone, and both together, and neither, all to no avail.
I'm lost as to where to go next really, I've read numerous threads/tutorials, and had no success with any of their methods. What do I need to do to get this working?
One final point, don't know if it's of any significance, but when I restart Apache from the command line I get this output:
Quote:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
|
Thanks