Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Some XCG Optimizations, home.php removal, adding category.php ect..
 
Reply
   X-Cart forums > Considering X-Cart > Considering using X-Cart for my project
 
Thread Tools Search this Thread
  #11  
Old 10-29-2013, 06:41 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

Quote:
Originally Posted by vapescom
Is this still the recommended method to get X-Cart working with Nginx? We are having difficulty with the URLS showing up properly. IE: Hitting our site from http://www.blah.com/ gives a 404 error, however hitting site to http://www.site.com/home.php or http://site.com/index.php both work.

I have not attempted the above yet, because I'm not sure it's required? I would just like the main url to work. Are the above instructions still valid? And how many headaches does this cause upgrading X-Cart in the future?

I'm trying to remove home.php from the url, and would like http://www.site.com/ to work.

any help is appreciated, here's our nginx config file;

versions:
nginx version: nginx/1.4.1 (Ubuntu)
PHP 5.5.3-1ubuntu2 (cli) (built: Oct 9 2013 14:49:12)



code:

There's nothing wrong with using nginx and x-cart. We've been using it for the past year and a half (via PHP-FPM) without incident. See my post at http://forum.x-cart.com/showpost.php?p=364263&postcount=18 for a full example. Again this is for PHP-FPM which you should be using for both FastCGI efficiency and proper privilege separation (e.g. running the site as a separate user than nginx and just giving nginx group permissions).
Reply With Quote
  #12  
Old 10-29-2013, 08:48 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,532
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

Post #1 - I never understood why QT has it mixed like that in the first place. And yes you are right - XC has no home page since home.php is a category page or serves categories pages.

I also like it to be separate although never bothered to do this, thanks for the post though

XC5 is the same way but uses cart.php. On my question why the reply was with the question - what is wrong with doing it this way...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #13  
Old 10-29-2013, 09:15 AM
 
vapescom vapescom is offline
 

Newbie
  
Join Date: Oct 2013
Posts: 3
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

Quote:
Originally Posted by exsecror
There's nothing wrong with using nginx and x-cart. We've been using it for the past year and a half (via PHP-FPM) without incident. See my post at http://forum.x-cart.com/showpost.php?p=364263&postcount=18 for a full example. Again this is for PHP-FPM which you should be using for both FastCGI efficiency and proper privilege separation (e.g. running the site as a separate user than nginx and just giving nginx group permissions).

Sorry, miscommunication. I know there's nothing wrong with it, just that we are having a few issues, namely that we couldn't get 'http://www.site.com' to work, as it was always looking for home.php, even if we had directoryindex set to home.php. And that there was something funky with the caching always asking if it was a CSRF vulnerability when we went to save. The latter was obviously our issue, but the former we're not sure about.

Also, we were using your example as our base too, just to be clear (from the other post you linked)

We've since switched to Apache 2.4 + PHP5-FPM + Zend OPCode and it appears to be the same speed.

Do you offer consulting? Could you take a look at our NGINX config to determine how we can get it to work without home.php and the main url working?

Thanks
__________________
Thanks,
VAPES
www.vapes.com

X-Cart: 4.6.1
Addons: None Yet
Reply With Quote
  #14  
Old 10-29-2013, 10:27 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

Quote:
Originally Posted by vapescom
Sorry, miscommunication. I know there's nothing wrong with it, just that we are having a few issues, namely that we couldn't get 'http://www.site.com' to work, as it was always looking for home.php, even if we had directoryindex set to home.php. And that there was something funky with the caching always asking if it was a CSRF vulnerability when we went to save. The latter was obviously our issue, but the former we're not sure about.

Also, we were using your example as our base too, just to be clear (from the other post you linked)

We've since switched to Apache 2.4 + PHP5-FPM + Zend OPCode and it appears to be the same speed.

Do you offer consulting? Could you take a look at our NGINX config to determine how we can get it to work without home.php and the main url working?

Thanks

A quick glance of your configuration shows:

Code:
index index.php index.htm index.html home.php;

It should either be just index home.php; or home.php needs to be the first on the line to prevent it from showing in the URL. What we did was rename home.php (and all it's references) to index.php but that permanently breaks the upgrade path (something to which we're not concerned with since we forked X-Cart internally). Unfortunately I do not offer consultancy services as my time is taken up between two employers.
Reply With Quote
  #15  
Old 10-29-2013, 10:35 AM
 
vapescom vapescom is offline
 

Newbie
  
Join Date: Oct 2013
Posts: 3
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

[quote=exsecror]A quick glance of your configuration shows:

Code:
index index.php index.htm index.html home.php;

You are correct, I should have noted, we did try home.php first on the line in a previous attempt, but were seeing the same results. Thanks for taking the time to reply though! I think for now, we are going to stick with Apache 2.4 + PHP-FPM as it's giving us the exact same results on load time, even under heavy load.

Thanks!
__________________
Thanks,
VAPES
www.vapes.com

X-Cart: 4.6.1
Addons: None Yet
Reply With Quote
  #16  
Old 10-30-2013, 06:19 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

My guess is then it's probably something to do with the whole index.php/home.php shenanigan they have with the X-Cart distribution. Since we eliminated that I have no way of knowing if that resolved that problem or not, sorry I cannot offer any other advice.
Reply With Quote
  #17  
Old 10-31-2013, 07:04 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

Quote:
Originally Posted by exsecror
What we did was rename home.php (and all it's references) to index.php but that permanently breaks the upgrade path (something to which we're not concerned with since we forked X-Cart internally).

Reading through this thread, that's what I kept thinking. Upgrades are gonna be impossible...or at least really hard.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #18  
Old 11-01-2013, 05:31 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Some XCG Optimizations, home.php removal, adding category.php ect..

Yeah it pretty much makes the entire upgrade process with the upstream package impossible because of what it does but again we forked X-Cart into an internal code base and backport features as needed so it was no big deal. I wouldn't recommended it for others to do unless they really want to.
Reply With Quote
Reply
   X-Cart forums > Considering X-Cart > Considering using X-Cart for my project


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:50 PM.

   

 
X-Cart forums © 2001-2018