I know music theory, basic guitar chords and basic scales. What should I be focusing on practicing in order to compose or improvise rock guitar solos, and just play famous solos by ear? I am talking about solos like Hotel California, Stairway to Heaven, those from Slash, and those from the Rolling Stones. What scales should I be practicing, and how? And are there any composition techniques that are helpful? Are there any specific web resources that could help me?
The basics for any good rock guitar solos are scales. Practice scales, and you will have the best basic technique for playing (and composing/improvising) solos. There are some good answers that relates to this in this question: Why learn scales? What are they for?
About what kind of scales, and how to practice, you can find some useful answers in this question: Logical way to learn movable scales on guitar?
It all comes down to practice and listening. In order to be able to write your own solos I would suggest the following:
It takes time, but practice is what will do it!
You should focus on three related areas: scales, shapes and licks.
You've already said you know the theory, so that's great. Take the time to study the kind of solos you want to work on, and work out what scales those solos are using. Note where they switch from one scale to another.
It's definitely worth practising scales, so you have the positions in muscle memory.
After that, it's a matter of personal preference how you approach soloing. Some people like to take an analytical approach ("The song is in C, so I will use the G mixolydian scale"). Other people develop a more instinctive approach ("I know the note I want to hear next, and I know where it is on the fretboard").
Find your own preference.
A shape is like a mini scale; a cluster of fret positions that produce notes that fit well together. A shape tends to be movable. You'll notice that a lot of the classic rock/blues guitarists have signature shapes that they come back to again and again. Copy them, and build your own collection of favourite shapes.
Build on top of scales and shapes, are licks -- stock musical phrases. Again, you'll notice that classic rock guitarists tend to have licks that they reuse again and again. You can learn licks that sound impressive, then just throw them into any solo when it feels right.
A lot of electric guitar licks are likely to involve techniques such as bends, slides, hammer-ons etc. which you wouldn't have used practising straight scales.
There are books full of licks, and seeing them tabbed is a good way to get started.
This may seem too obvious, but I learned how to improvise solos mainly by reading transcriptions in magazines like Guitar For the Practicing Musician, Guitar World, and Guitar School. I preferred the GFTPM ones, because they would give more of the song (vocal melodies, bass transcriptions, and even drum transcriptions!).
So maybe get a transcribed book for a classic album by each master; and work them up!
[I know the question was geared towards "free" materials, but good transcriptions can save you lots of time (==money), not to mention frustration. In the magazines, they'll often give you a brief article about the techniques required (including exercises).]