[aur-dev] Some issues after installing AUR locally
Hi all, After following the instructions and giving Apache access to my home directory, I managed to go to the local AUR home page. However, apart from not having dummy data, I have some issues: 1) There's a message above the page saying "Notice: Undefined index: PATH_INFO in /home/mk/archdev/aur/web/html/index.php on line 7". I checked with a php_info() command and it's indeed not present. 2) http://aur/packages/, aur/register/, and aur/login/ are not available (though packages.php is). Should I set some option in my config files? 3) Now http://aur and http://localhost point to the same page (the AUR home page). Is there a method to be able to point http://localhost back to /srv/http (without losing http://aur)? Thanks in advance! Regards, Marcel
On Wed, Dec 5, 2012 at 12:28 PM, Marcel Korpel <marcel.lists@gmail.com> wrote:
Hi all,
After following the instructions and giving Apache access to my home directory, I managed to go to the local AUR home page. However, apart from not having dummy data, I have some issues:
Could you please open a bug report on the tracker for the dummy data generation issue [1]? It looks like unicode characters in the seed file are causing your issues.
1) There's a message above the page saying "Notice: Undefined index: PATH_INFO in /home/mk/archdev/aur/web/html/index.php on line 7". I checked with a php_info() command and it's indeed not present.
The URL routing backend currently needs PATH_INFO to work correctly. If it's not properly passed to PHP, you'll get this error.
2) http://aur/packages/, aur/register/, and aur/login/ are not available (though packages.php is). Should I set some option in my config files?
This is connected to your first issue. I'm guessing you have $USE_VIRTUAL_URLS in web/lib/config.inc.php set to true, but aren't actually rewriting any of your URLs? Make sure you enable mod_rewrite to use that functionality. I'm not sure the exact config options in Apache, but I use the following rule in lighttpd: url.rewrite = ( "^(.*)$" => "/index.php/$1" ) You could also just set $USE_VIRTUAL_URLS to false and navigate using the legacy pages packages.php, account.php, etc... Although I would recommend using rewriting to get a closer match of how the actual AUR behaves now.
3) Now http://aur and http://localhost point to the same page (the AUR home page). Is there a method to be able to point http://localhost back to /srv/http (without losing http://aur)?
I'm not an expert on this but I believe you can just have another vhost. Have a <VirtualHost localhost:80></VirtualHost> block with all the appropriate info and DocumentRoot pointing to "/srv/http" instead of what aur points to. Also make sure you have NameVirtualHost set correctly. There are docs that have examples that can give you more precise information [2]. Sorry you've had some issues getting the AUR installed. Installation can be a bit tricky and the docs aren't overly explicit. Let me know if you need more help! Regards, Jason [1] https://bugs.archlinux.org/index/proj2 [2] http://httpd.apache.org/docs/2.2/vhosts/
On Wed, Dec 5, 2012 at 8:24 PM, canyonknight <canyonknight@gmail.com> wrote:
Could you please open a bug report on the tracker for the dummy data generation issue [1]?
Done: https://bugs.archlinux.org/task/32986
The URL routing backend currently needs PATH_INFO to work correctly. If it's not properly passed to PHP, you'll get this error.
But how can I set this? Adding a RewriteRule solved this issue, though.
2) http://aur/packages/, aur/register/, and aur/login/ are not available (though packages.php is). Should I set some option in my config files?
This is connected to your first issue. I'm guessing you have $USE_VIRTUAL_URLS in web/lib/config.inc.php set to true, but aren't actually rewriting any of your URLs? Make sure you enable mod_rewrite to use that functionality. I'm not sure the exact config options in Apache, but I use the following rule in lighttpd:
url.rewrite = ( "^(.*)$" => "/index.php/$1" )
I added an .htaccess file containing: RewriteEngine on RewriteRule ^(?!index\.php/.*)(.*)$ /index.php/$1 The (?!index\.php/.*) part is necessary to avoid looping. BTW, the PATH_INFO message disappeared after I added this file.
You could also just set $USE_VIRTUAL_URLS to false and navigate using the legacy pages packages.php, account.php, etc... Although I would recommend using rewriting to get a closer match of how the actual AUR behaves now.
Indeed. Shouldn't this .htaccess file be included in the AUR? Or in INSTALL?
3) Now http://aur and http://localhost point to the same page (the AUR home page). Is there a method to be able to point http://localhost back to /srv/http (without losing http://aur)?
I'm not an expert on this but I believe you can just have another vhost. Have a <VirtualHost localhost:80></VirtualHost> block with all the appropriate info and DocumentRoot pointing to "/srv/http" instead of what aur points to.
Not entirely. I had to add <VirtualHost *:80> Servername localhost DocumentRoot /srv/http </VirtualHost> and change the line <VirtualHost aur:80> to <VirtualHost *:80>. I think this last change should be added to INSTALL. Regards, Marcel
On Thu, Dec 6, 2012 at 10:25 AM, Marcel Korpel <marcel.lists@gmail.com> wrote:
On Wed, Dec 5, 2012 at 8:24 PM, canyonknight <canyonknight@gmail.com> wrote:
<snip>
You could also just set $USE_VIRTUAL_URLS to false and navigate using the legacy pages packages.php, account.php, etc... Although I would recommend using rewriting to get a closer match of how the actual AUR behaves now.
Indeed. Shouldn't this .htaccess file be included in the AUR? Or in INSTALL?
No. An htaccess file shouldn't be part of the source tree. An example rewrite rule in INSTALL would probably be good. Regards, Jason
participants (2)
-
canyonknight
-
Marcel Korpel